wmglobalqueue 2.4.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Utils/CPMetrics.py +270 -0
- Utils/CertTools.py +100 -0
- Utils/EmailAlert.py +50 -0
- Utils/ExtendedUnitTestCase.py +62 -0
- Utils/FileTools.py +182 -0
- Utils/IteratorTools.py +80 -0
- Utils/MathUtils.py +31 -0
- Utils/MemoryCache.py +119 -0
- Utils/Patterns.py +24 -0
- Utils/Pipeline.py +137 -0
- Utils/PortForward.py +97 -0
- Utils/ProcFS.py +112 -0
- Utils/ProcessStats.py +194 -0
- Utils/PythonVersion.py +17 -0
- Utils/Signals.py +36 -0
- Utils/TemporaryEnvironment.py +27 -0
- Utils/Throttled.py +227 -0
- Utils/Timers.py +130 -0
- Utils/Timestamps.py +86 -0
- Utils/TokenManager.py +143 -0
- Utils/Tracing.py +60 -0
- Utils/TwPrint.py +98 -0
- Utils/Utilities.py +318 -0
- Utils/__init__.py +11 -0
- Utils/wmcoreDTools.py +707 -0
- WMCore/ACDC/Collection.py +57 -0
- WMCore/ACDC/CollectionTypes.py +12 -0
- WMCore/ACDC/CouchCollection.py +67 -0
- WMCore/ACDC/CouchFileset.py +238 -0
- WMCore/ACDC/CouchService.py +73 -0
- WMCore/ACDC/DataCollectionService.py +485 -0
- WMCore/ACDC/Fileset.py +94 -0
- WMCore/ACDC/__init__.py +11 -0
- WMCore/Algorithms/Alarm.py +39 -0
- WMCore/Algorithms/MathAlgos.py +274 -0
- WMCore/Algorithms/MiscAlgos.py +67 -0
- WMCore/Algorithms/ParseXMLFile.py +115 -0
- WMCore/Algorithms/Permissions.py +27 -0
- WMCore/Algorithms/Singleton.py +58 -0
- WMCore/Algorithms/SubprocessAlgos.py +129 -0
- WMCore/Algorithms/__init__.py +7 -0
- WMCore/Cache/GenericDataCache.py +98 -0
- WMCore/Cache/WMConfigCache.py +572 -0
- WMCore/Cache/__init__.py +0 -0
- WMCore/Configuration.py +659 -0
- WMCore/DAOFactory.py +47 -0
- WMCore/DataStructs/File.py +177 -0
- WMCore/DataStructs/Fileset.py +140 -0
- WMCore/DataStructs/Job.py +182 -0
- WMCore/DataStructs/JobGroup.py +142 -0
- WMCore/DataStructs/JobPackage.py +49 -0
- WMCore/DataStructs/LumiList.py +734 -0
- WMCore/DataStructs/Mask.py +219 -0
- WMCore/DataStructs/MathStructs/ContinuousSummaryHistogram.py +197 -0
- WMCore/DataStructs/MathStructs/DiscreteSummaryHistogram.py +92 -0
- WMCore/DataStructs/MathStructs/SummaryHistogram.py +117 -0
- WMCore/DataStructs/MathStructs/__init__.py +0 -0
- WMCore/DataStructs/Pickleable.py +24 -0
- WMCore/DataStructs/Run.py +256 -0
- WMCore/DataStructs/Subscription.py +175 -0
- WMCore/DataStructs/WMObject.py +47 -0
- WMCore/DataStructs/WorkUnit.py +112 -0
- WMCore/DataStructs/Workflow.py +60 -0
- WMCore/DataStructs/__init__.py +8 -0
- WMCore/Database/CMSCouch.py +1430 -0
- WMCore/Database/ConfigDBMap.py +29 -0
- WMCore/Database/CouchMonitoring.py +450 -0
- WMCore/Database/CouchUtils.py +118 -0
- WMCore/Database/DBCore.py +198 -0
- WMCore/Database/DBCreator.py +113 -0
- WMCore/Database/DBExceptionHandler.py +59 -0
- WMCore/Database/DBFactory.py +117 -0
- WMCore/Database/DBFormatter.py +177 -0
- WMCore/Database/Dialects.py +13 -0
- WMCore/Database/ExecuteDAO.py +327 -0
- WMCore/Database/MongoDB.py +241 -0
- WMCore/Database/MySQL/Destroy.py +42 -0
- WMCore/Database/MySQL/ListUserContent.py +20 -0
- WMCore/Database/MySQL/__init__.py +9 -0
- WMCore/Database/MySQLCore.py +132 -0
- WMCore/Database/Oracle/Destroy.py +56 -0
- WMCore/Database/Oracle/ListUserContent.py +19 -0
- WMCore/Database/Oracle/__init__.py +9 -0
- WMCore/Database/ResultSet.py +44 -0
- WMCore/Database/Transaction.py +91 -0
- WMCore/Database/__init__.py +9 -0
- WMCore/Database/ipy_profile_couch.py +438 -0
- WMCore/GlobalWorkQueue/CherryPyThreads/CleanUpTask.py +29 -0
- WMCore/GlobalWorkQueue/CherryPyThreads/HeartbeatMonitor.py +105 -0
- WMCore/GlobalWorkQueue/CherryPyThreads/LocationUpdateTask.py +28 -0
- WMCore/GlobalWorkQueue/CherryPyThreads/ReqMgrInteractionTask.py +35 -0
- WMCore/GlobalWorkQueue/CherryPyThreads/__init__.py +0 -0
- WMCore/GlobalWorkQueue/__init__.py +0 -0
- WMCore/GroupUser/CouchObject.py +127 -0
- WMCore/GroupUser/Decorators.py +51 -0
- WMCore/GroupUser/Group.py +33 -0
- WMCore/GroupUser/Interface.py +73 -0
- WMCore/GroupUser/User.py +96 -0
- WMCore/GroupUser/__init__.py +11 -0
- WMCore/Lexicon.py +836 -0
- WMCore/REST/Auth.py +202 -0
- WMCore/REST/CherryPyPeriodicTask.py +166 -0
- WMCore/REST/Error.py +333 -0
- WMCore/REST/Format.py +642 -0
- WMCore/REST/HeartbeatMonitorBase.py +90 -0
- WMCore/REST/Main.py +636 -0
- WMCore/REST/Server.py +2435 -0
- WMCore/REST/Services.py +24 -0
- WMCore/REST/Test.py +120 -0
- WMCore/REST/Tools.py +38 -0
- WMCore/REST/Validation.py +250 -0
- WMCore/REST/__init__.py +1 -0
- WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
- WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
- WMCore/ReqMgr/DataStructs/__init__.py +0 -0
- WMCore/ReqMgr/__init__.py +1 -0
- WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
- WMCore/Services/AlertManager/__init__.py +0 -0
- WMCore/Services/CRIC/CRIC.py +238 -0
- WMCore/Services/CRIC/__init__.py +0 -0
- WMCore/Services/DBS/DBS3Reader.py +1044 -0
- WMCore/Services/DBS/DBSConcurrency.py +44 -0
- WMCore/Services/DBS/DBSErrors.py +112 -0
- WMCore/Services/DBS/DBSReader.py +23 -0
- WMCore/Services/DBS/DBSUtils.py +166 -0
- WMCore/Services/DBS/DBSWriterObjects.py +381 -0
- WMCore/Services/DBS/ProdException.py +133 -0
- WMCore/Services/DBS/__init__.py +8 -0
- WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
- WMCore/Services/FWJRDB/__init__.py +0 -0
- WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
- WMCore/Services/HTTPS/__init__.py +0 -0
- WMCore/Services/LogDB/LogDB.py +201 -0
- WMCore/Services/LogDB/LogDBBackend.py +191 -0
- WMCore/Services/LogDB/LogDBExceptions.py +11 -0
- WMCore/Services/LogDB/LogDBReport.py +85 -0
- WMCore/Services/LogDB/__init__.py +0 -0
- WMCore/Services/MSPileup/__init__.py +0 -0
- WMCore/Services/MSUtils/MSUtils.py +54 -0
- WMCore/Services/MSUtils/__init__.py +0 -0
- WMCore/Services/McM/McM.py +173 -0
- WMCore/Services/McM/__init__.py +8 -0
- WMCore/Services/MonIT/Grafana.py +133 -0
- WMCore/Services/MonIT/__init__.py +0 -0
- WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
- WMCore/Services/PyCondor/__init__.py +0 -0
- WMCore/Services/ReqMgr/ReqMgr.py +261 -0
- WMCore/Services/ReqMgr/__init__.py +0 -0
- WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
- WMCore/Services/ReqMgrAux/__init__.py +0 -0
- WMCore/Services/RequestDB/RequestDBReader.py +267 -0
- WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
- WMCore/Services/RequestDB/__init__.py +0 -0
- WMCore/Services/Requests.py +624 -0
- WMCore/Services/Rucio/Rucio.py +1290 -0
- WMCore/Services/Rucio/RucioUtils.py +74 -0
- WMCore/Services/Rucio/__init__.py +0 -0
- WMCore/Services/RucioConMon/RucioConMon.py +121 -0
- WMCore/Services/RucioConMon/__init__.py +0 -0
- WMCore/Services/Service.py +400 -0
- WMCore/Services/StompAMQ/__init__.py +0 -0
- WMCore/Services/TagCollector/TagCollector.py +155 -0
- WMCore/Services/TagCollector/XMLUtils.py +98 -0
- WMCore/Services/TagCollector/__init__.py +0 -0
- WMCore/Services/UUIDLib.py +13 -0
- WMCore/Services/UserFileCache/UserFileCache.py +160 -0
- WMCore/Services/UserFileCache/__init__.py +8 -0
- WMCore/Services/WMAgent/WMAgent.py +63 -0
- WMCore/Services/WMAgent/__init__.py +0 -0
- WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
- WMCore/Services/WMArchive/DataMap.py +463 -0
- WMCore/Services/WMArchive/WMArchive.py +33 -0
- WMCore/Services/WMArchive/__init__.py +0 -0
- WMCore/Services/WMBS/WMBS.py +97 -0
- WMCore/Services/WMBS/__init__.py +0 -0
- WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
- WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
- WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
- WMCore/Services/WMStats/WMStatsReader.py +445 -0
- WMCore/Services/WMStats/WMStatsWriter.py +273 -0
- WMCore/Services/WMStats/__init__.py +0 -0
- WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
- WMCore/Services/WMStatsServer/__init__.py +0 -0
- WMCore/Services/WorkQueue/WorkQueue.py +492 -0
- WMCore/Services/WorkQueue/__init__.py +0 -0
- WMCore/Services/__init__.py +8 -0
- WMCore/Services/pycurl_manager.py +574 -0
- WMCore/WMBase.py +50 -0
- WMCore/WMConnectionBase.py +164 -0
- WMCore/WMException.py +183 -0
- WMCore/WMExceptions.py +269 -0
- WMCore/WMFactory.py +76 -0
- WMCore/WMInit.py +377 -0
- WMCore/WMLogging.py +104 -0
- WMCore/WMSpec/ConfigSectionTree.py +442 -0
- WMCore/WMSpec/Persistency.py +135 -0
- WMCore/WMSpec/Steps/BuildMaster.py +87 -0
- WMCore/WMSpec/Steps/BuildTools.py +201 -0
- WMCore/WMSpec/Steps/Builder.py +97 -0
- WMCore/WMSpec/Steps/Diagnostic.py +89 -0
- WMCore/WMSpec/Steps/Emulator.py +62 -0
- WMCore/WMSpec/Steps/ExecuteMaster.py +208 -0
- WMCore/WMSpec/Steps/Executor.py +210 -0
- WMCore/WMSpec/Steps/StepFactory.py +213 -0
- WMCore/WMSpec/Steps/TaskEmulator.py +75 -0
- WMCore/WMSpec/Steps/Template.py +204 -0
- WMCore/WMSpec/Steps/Templates/AlcaHarvest.py +76 -0
- WMCore/WMSpec/Steps/Templates/CMSSW.py +613 -0
- WMCore/WMSpec/Steps/Templates/DQMUpload.py +59 -0
- WMCore/WMSpec/Steps/Templates/DeleteFiles.py +70 -0
- WMCore/WMSpec/Steps/Templates/LogArchive.py +84 -0
- WMCore/WMSpec/Steps/Templates/LogCollect.py +105 -0
- WMCore/WMSpec/Steps/Templates/StageOut.py +105 -0
- WMCore/WMSpec/Steps/Templates/__init__.py +10 -0
- WMCore/WMSpec/Steps/WMExecutionFailure.py +21 -0
- WMCore/WMSpec/Steps/__init__.py +8 -0
- WMCore/WMSpec/Utilities.py +63 -0
- WMCore/WMSpec/WMSpecErrors.py +12 -0
- WMCore/WMSpec/WMStep.py +347 -0
- WMCore/WMSpec/WMTask.py +1997 -0
- WMCore/WMSpec/WMWorkload.py +2288 -0
- WMCore/WMSpec/WMWorkloadTools.py +382 -0
- WMCore/WMSpec/__init__.py +9 -0
- WMCore/WorkQueue/DataLocationMapper.py +273 -0
- WMCore/WorkQueue/DataStructs/ACDCBlock.py +47 -0
- WMCore/WorkQueue/DataStructs/Block.py +48 -0
- WMCore/WorkQueue/DataStructs/CouchWorkQueueElement.py +148 -0
- WMCore/WorkQueue/DataStructs/WorkQueueElement.py +274 -0
- WMCore/WorkQueue/DataStructs/WorkQueueElementResult.py +152 -0
- WMCore/WorkQueue/DataStructs/WorkQueueElementsSummary.py +185 -0
- WMCore/WorkQueue/DataStructs/__init__.py +0 -0
- WMCore/WorkQueue/Policy/End/EndPolicyInterface.py +44 -0
- WMCore/WorkQueue/Policy/End/SingleShot.py +22 -0
- WMCore/WorkQueue/Policy/End/__init__.py +32 -0
- WMCore/WorkQueue/Policy/PolicyInterface.py +17 -0
- WMCore/WorkQueue/Policy/Start/Block.py +258 -0
- WMCore/WorkQueue/Policy/Start/Dataset.py +180 -0
- WMCore/WorkQueue/Policy/Start/MonteCarlo.py +131 -0
- WMCore/WorkQueue/Policy/Start/ResubmitBlock.py +171 -0
- WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py +316 -0
- WMCore/WorkQueue/Policy/Start/__init__.py +34 -0
- WMCore/WorkQueue/Policy/__init__.py +57 -0
- WMCore/WorkQueue/WMBSHelper.py +772 -0
- WMCore/WorkQueue/WorkQueue.py +1237 -0
- WMCore/WorkQueue/WorkQueueBackend.py +750 -0
- WMCore/WorkQueue/WorkQueueBase.py +39 -0
- WMCore/WorkQueue/WorkQueueExceptions.py +44 -0
- WMCore/WorkQueue/WorkQueueReqMgrInterface.py +278 -0
- WMCore/WorkQueue/WorkQueueUtils.py +130 -0
- WMCore/WorkQueue/__init__.py +13 -0
- WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
- WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
- WMCore/Wrappers/__init__.py +6 -0
- WMCore/__init__.py +10 -0
- wmglobalqueue-2.4.5.1.data/data/bin/wmc-dist-patch +15 -0
- wmglobalqueue-2.4.5.1.data/data/bin/wmc-dist-unpatch +8 -0
- wmglobalqueue-2.4.5.1.data/data/bin/wmc-httpd +3 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/.couchapprc +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/README.md +40 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/index.html +264 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/ElementInfoByWorkflow.js +96 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/StuckElementInfo.js +57 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/WorkloadInfoTable.js +80 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/dataTable.js +70 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/js/namespace.js +23 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/_attachments/style/main.css +75 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/couchapp.json +4 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/childQueueFilter.js +13 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/filterDeletedDocs.js +3 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/filters/queueFilter.js +11 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/language +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/mustache.js +333 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/validate.js +27 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lib/workqueue_utils.js +61 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/elementsDetail.js +28 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/filter.js +86 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/stuckElements.js +38 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/workRestrictions.js +153 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/lists/workflowSummary.js +28 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/rewrites.json +73 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/shows/redirect.js +23 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/shows/status.js +40 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/ElementSummaryByWorkflow.html +27 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/StuckElementSummary.html +26 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/TaskStatus.html +23 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/WorkflowSummary.html +27 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/workqueue-common-lib.html +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/yui-lib-remote.html +16 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/yui-lib.html +18 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/updates/in-place.js +50 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/validate_doc_update.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/vendor/couchapp/_attachments/jquery.couch.app.js +235 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/vendor/couchapp/_attachments/jquery.pathbinder.js +173 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeData/reduce.js +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeParentData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activeParentData/reduce.js +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activePileupData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/activePileupData/reduce.js +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/analyticsData/map.js +11 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/analyticsData/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/availableByPriority/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/conflicts/map.js +5 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elements/map.js +5 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByParent/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByParentData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByPileupData/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByStatus/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsBySubscription/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByWorkflow/map.js +8 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsByWorkflow/reduce.js +3 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/elementsDetailByWorkflowAndStatus/map.js +26 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobInjectStatusByRequest/map.js +10 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobInjectStatusByRequest/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobStatusByRequest/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobStatusByRequest/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndPriority/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndPriority/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndStatus/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByChildQueueAndStatus/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByRequest/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByRequest/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatus/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatus/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatusAndPriority/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/jobsByStatusAndPriority/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/openRequests/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/recent-items/map.js +5 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/siteWhitelistByRequest/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/siteWhitelistByRequest/reduce.js +1 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/specsByWorkflow/map.js +5 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/stuckElements/map.js +38 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsInjectStatusByRequest/map.js +12 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsInjectStatusByRequest/reduce.js +3 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrl/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrl/reduce.js +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrlByRequest/map.js +6 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/wmbsUrlByRequest/reduce.js +2 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/workflowSummary/map.js +9 -0
- wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/views/workflowSummary/reduce.js +10 -0
- wmglobalqueue-2.4.5.1.dist-info/METADATA +26 -0
- wmglobalqueue-2.4.5.1.dist-info/RECORD +347 -0
- wmglobalqueue-2.4.5.1.dist-info/WHEEL +5 -0
- wmglobalqueue-2.4.5.1.dist-info/licenses/LICENSE +202 -0
- wmglobalqueue-2.4.5.1.dist-info/licenses/NOTICE +16 -0
- wmglobalqueue-2.4.5.1.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_MySQLCore_
|
|
4
|
+
|
|
5
|
+
Handle bind variable parsing for MySQL.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import copy
|
|
9
|
+
|
|
10
|
+
from WMCore.Database.DBCore import DBInterface
|
|
11
|
+
from WMCore.Database.ResultSet import ResultSet
|
|
12
|
+
|
|
13
|
+
def bindVarCompare(a):
|
|
14
|
+
"""
|
|
15
|
+
_bindVarCompare_
|
|
16
|
+
|
|
17
|
+
Bind variables are represented as a tuple with the first element being the
|
|
18
|
+
variable name and the second being it's position in the query. We sort on
|
|
19
|
+
the position in the query.
|
|
20
|
+
"""
|
|
21
|
+
return a[1]
|
|
22
|
+
|
|
23
|
+
def stringLengthCompare(a):
|
|
24
|
+
"""
|
|
25
|
+
_stringLengthCompare_
|
|
26
|
+
|
|
27
|
+
Sort comparison function to sort strings by length.
|
|
28
|
+
Since we want to sort from longest to shortest, this must be reversed when used
|
|
29
|
+
"""
|
|
30
|
+
return len(a)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class MySQLInterface(DBInterface):
|
|
34
|
+
def substitute(self, origSQL, origBindsList):
|
|
35
|
+
"""
|
|
36
|
+
_substitute_
|
|
37
|
+
|
|
38
|
+
Transform as set of bind variables from a list of dictionaries to a list
|
|
39
|
+
of tuples:
|
|
40
|
+
|
|
41
|
+
b = [ {'bind1':'value1a', 'bind2': 'value2a'},
|
|
42
|
+
{'bind1':'value1b', 'bind2': 'value2b'} ]
|
|
43
|
+
|
|
44
|
+
Will be transformed into:
|
|
45
|
+
|
|
46
|
+
b = [ ('value1a', 'value2a'), ('value1b', 'value2b')]
|
|
47
|
+
|
|
48
|
+
Don't need to substitute in the binds as executemany does that
|
|
49
|
+
internally. But the sql will also need to be reformatted, such that
|
|
50
|
+
:bind_name becomes %s.
|
|
51
|
+
|
|
52
|
+
See: http://www.devshed.com/c/a/Python/MySQL-Connectivity-With-Python/5/
|
|
53
|
+
"""
|
|
54
|
+
if origBindsList == None:
|
|
55
|
+
return origSQL, None
|
|
56
|
+
|
|
57
|
+
origBindsList = self.makelist(origBindsList)
|
|
58
|
+
origBind = origBindsList[0]
|
|
59
|
+
|
|
60
|
+
bindVarPositionList = []
|
|
61
|
+
updatedSQL = copy.copy(origSQL)
|
|
62
|
+
|
|
63
|
+
# We process bind variables from longest to shortest to avoid a shorter
|
|
64
|
+
# bind variable matching a longer one. For example if we have two bind
|
|
65
|
+
# variables: RELEASE_VERSION and RELEASE_VERSION_ID the former will
|
|
66
|
+
# match against the latter, causing problems. We'll sort the variable
|
|
67
|
+
# names by length to guard against this.
|
|
68
|
+
bindVarNames = list(origBind)
|
|
69
|
+
bindVarNames.sort(key=stringLengthCompare, reverse=True)
|
|
70
|
+
|
|
71
|
+
bindPositions = {}
|
|
72
|
+
for bindName in bindVarNames:
|
|
73
|
+
searchPosition = 0
|
|
74
|
+
|
|
75
|
+
while True:
|
|
76
|
+
bindPosition = origSQL.lower().find(":%s" % bindName.lower(),
|
|
77
|
+
searchPosition)
|
|
78
|
+
if bindPosition == -1:
|
|
79
|
+
break
|
|
80
|
+
|
|
81
|
+
if bindPosition not in bindPositions:
|
|
82
|
+
bindPositions[bindPosition] = 0
|
|
83
|
+
bindVarPositionList.append((bindName, bindPosition))
|
|
84
|
+
searchPosition = bindPosition + 1
|
|
85
|
+
|
|
86
|
+
searchPosition = 0
|
|
87
|
+
while True:
|
|
88
|
+
bindPosition = updatedSQL.lower().find(":%s" % bindName.lower(),
|
|
89
|
+
searchPosition)
|
|
90
|
+
|
|
91
|
+
if bindPosition == -1:
|
|
92
|
+
break
|
|
93
|
+
|
|
94
|
+
left = updatedSQL[0:bindPosition]
|
|
95
|
+
right = updatedSQL[bindPosition + len(bindName) + 1:]
|
|
96
|
+
updatedSQL = left + "%s" + right
|
|
97
|
+
|
|
98
|
+
bindVarPositionList.sort(key=bindVarCompare)
|
|
99
|
+
|
|
100
|
+
mySQLBindVarsList = []
|
|
101
|
+
for origBind in origBindsList:
|
|
102
|
+
mySQLBindVars = []
|
|
103
|
+
for bindVarPosition in bindVarPositionList:
|
|
104
|
+
mySQLBindVars.append(origBind[bindVarPosition[0]])
|
|
105
|
+
|
|
106
|
+
mySQLBindVarsList.append(tuple(mySQLBindVars))
|
|
107
|
+
|
|
108
|
+
return (updatedSQL, mySQLBindVarsList)
|
|
109
|
+
|
|
110
|
+
def executebinds(self, s = None, b = None, connection = None,
|
|
111
|
+
returnCursor = False):
|
|
112
|
+
"""
|
|
113
|
+
_executebinds_
|
|
114
|
+
|
|
115
|
+
Execute a SQL statement that has a single set of bind variables.
|
|
116
|
+
Transform the bind variables into the format that MySQL expects.
|
|
117
|
+
"""
|
|
118
|
+
s, b = self.substitute(s, b)
|
|
119
|
+
return DBInterface.executebinds(self, s, b, connection, returnCursor)
|
|
120
|
+
|
|
121
|
+
def executemanybinds(self, s = None, b = None, connection = None,
|
|
122
|
+
returnCursor = False):
|
|
123
|
+
"""
|
|
124
|
+
_executemanybinds_
|
|
125
|
+
|
|
126
|
+
Execute a SQL statement that has multiple sets of bind variables.
|
|
127
|
+
Transform the bind variables into the format that MySQL expects.
|
|
128
|
+
"""
|
|
129
|
+
newsql, binds = self.substitute(s, b)
|
|
130
|
+
|
|
131
|
+
return DBInterface.executemanybinds(self, newsql, binds, connection,
|
|
132
|
+
returnCursor)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""
|
|
2
|
+
_Destroy_
|
|
3
|
+
|
|
4
|
+
Implementation of Destroy for Oracle
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from WMCore.Database.DBFormatter import DBFormatter
|
|
9
|
+
|
|
10
|
+
class Destroy(DBFormatter):
|
|
11
|
+
|
|
12
|
+
def execute(self, subscription = None, conn = None, transaction = False):
|
|
13
|
+
|
|
14
|
+
sql = """DECLARE
|
|
15
|
+
BEGIN
|
|
16
|
+
|
|
17
|
+
execute immediate 'purge recyclebin';
|
|
18
|
+
|
|
19
|
+
-- Tables
|
|
20
|
+
FOR o IN (SELECT table_name name FROM user_tables) LOOP
|
|
21
|
+
execute immediate 'drop table ' || o.name || ' cascade constraints';
|
|
22
|
+
END LOOP;
|
|
23
|
+
|
|
24
|
+
-- Sequences
|
|
25
|
+
FOR o IN (SELECT sequence_name name FROM user_sequences) LOOP
|
|
26
|
+
execute immediate 'drop sequence ' || o.name;
|
|
27
|
+
END LOOP;
|
|
28
|
+
|
|
29
|
+
-- Triggers
|
|
30
|
+
FOR o IN (SELECT trigger_name name FROM user_triggers) LOOP
|
|
31
|
+
execute immediate 'drop trigger ' || o.name;
|
|
32
|
+
END LOOP;
|
|
33
|
+
|
|
34
|
+
-- Synonyms
|
|
35
|
+
FOR o IN (SELECT synonym_name name FROM user_synonyms) LOOP
|
|
36
|
+
execute immediate 'drop synonym ' || o.name;
|
|
37
|
+
END LOOP;
|
|
38
|
+
|
|
39
|
+
-- Functions
|
|
40
|
+
FOR o IN (SELECT object_name name FROM user_objects WHERE object_type = 'FUNCTION') LOOP
|
|
41
|
+
execute immediate 'drop function ' || o.name;
|
|
42
|
+
END LOOP;
|
|
43
|
+
|
|
44
|
+
-- Procedures
|
|
45
|
+
FOR o IN (SELECT object_name name FROM user_objects WHERE object_type = 'PROCEDURE') LOOP
|
|
46
|
+
execute immediate 'drop procedure ' || o.name;
|
|
47
|
+
END LOOP;
|
|
48
|
+
|
|
49
|
+
execute immediate 'purge recyclebin';
|
|
50
|
+
|
|
51
|
+
END;"""
|
|
52
|
+
|
|
53
|
+
self.dbi.processData(sql, {}, conn = conn,
|
|
54
|
+
transaction = transaction)
|
|
55
|
+
|
|
56
|
+
return
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
_ListUserContent_
|
|
3
|
+
|
|
4
|
+
Implementation of ListUserContent for Oracle
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from WMCore.Database.DBFormatter import DBFormatter
|
|
9
|
+
|
|
10
|
+
class ListUserContent(DBFormatter):
|
|
11
|
+
|
|
12
|
+
def execute(self, subscription = None, conn = None, transaction = False):
|
|
13
|
+
|
|
14
|
+
sql = """SELECT object_name FROM user_objects"""
|
|
15
|
+
|
|
16
|
+
result = self.dbi.processData(sql, {}, conn = conn,
|
|
17
|
+
transaction = transaction)
|
|
18
|
+
|
|
19
|
+
return self.formatDict(result)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""
|
|
2
|
+
_ResultSet_
|
|
3
|
+
|
|
4
|
+
A class to read in a SQLAlchemy result proxy and hold the data, such that the
|
|
5
|
+
SQLAlchemy result sets (aka cursors) can be closed. Make this class look as much
|
|
6
|
+
like the SQLAlchemy class to minimise the impact of adding this class.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from builtins import object
|
|
10
|
+
import threading
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResultSet(object):
|
|
14
|
+
def __init__(self):
|
|
15
|
+
self.data = []
|
|
16
|
+
self.keys = []
|
|
17
|
+
|
|
18
|
+
def close(self):
|
|
19
|
+
return
|
|
20
|
+
|
|
21
|
+
def fetchone(self):
|
|
22
|
+
if len(self.data) > 0:
|
|
23
|
+
return self.data[0]
|
|
24
|
+
else:
|
|
25
|
+
return []
|
|
26
|
+
|
|
27
|
+
def fetchall(self):
|
|
28
|
+
return self.data
|
|
29
|
+
|
|
30
|
+
def add(self, resultproxy):
|
|
31
|
+
|
|
32
|
+
myThread = threading.currentThread()
|
|
33
|
+
|
|
34
|
+
if resultproxy.closed:
|
|
35
|
+
return
|
|
36
|
+
elif resultproxy.returns_rows:
|
|
37
|
+
for r in resultproxy:
|
|
38
|
+
if len(self.keys) == 0:
|
|
39
|
+
# do not modernize next line.
|
|
40
|
+
# r is a `sqlalchemy.engine.result.RowProxy`, not a `dict`
|
|
41
|
+
self.keys.extend(r.keys())
|
|
42
|
+
self.data.append(r)
|
|
43
|
+
|
|
44
|
+
return
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_Transaction_
|
|
4
|
+
|
|
5
|
+
A simple wrapper around DBInterface to make working with transactions simpler
|
|
6
|
+
|
|
7
|
+
On MySQL transactions only work for innodb tables.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
import time
|
|
14
|
+
|
|
15
|
+
from WMCore.DataStructs.WMObject import WMObject
|
|
16
|
+
from WMCore.WMException import WMException
|
|
17
|
+
from WMCore.WMExceptions import WMEXCEPTION
|
|
18
|
+
|
|
19
|
+
class Transaction(WMObject):
|
|
20
|
+
dbi = None
|
|
21
|
+
|
|
22
|
+
def __init__(self, dbinterface = None):
|
|
23
|
+
"""
|
|
24
|
+
Get the connection from the DBInterface and open a new transaction on it
|
|
25
|
+
"""
|
|
26
|
+
self.dbi = dbinterface
|
|
27
|
+
self.conn = None
|
|
28
|
+
self.transaction = None
|
|
29
|
+
|
|
30
|
+
def begin(self):
|
|
31
|
+
if self.conn == None:
|
|
32
|
+
self.conn = self.dbi.connection()
|
|
33
|
+
if self.conn.closed:
|
|
34
|
+
self.conn = self.dbi.connection()
|
|
35
|
+
|
|
36
|
+
if self.transaction == None:
|
|
37
|
+
self.transaction = self.conn.begin()
|
|
38
|
+
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
def processData(self, sql, binds={}):
|
|
42
|
+
"""
|
|
43
|
+
Propagates the request to the proper dbcore backend,
|
|
44
|
+
and performs checks for lost (or closed) connection.
|
|
45
|
+
"""
|
|
46
|
+
result = self.dbi.processData(sql, binds, conn = self.conn,
|
|
47
|
+
transaction = True)
|
|
48
|
+
return result
|
|
49
|
+
|
|
50
|
+
def commit(self):
|
|
51
|
+
"""
|
|
52
|
+
Commit the transaction and return the connection to the pool
|
|
53
|
+
"""
|
|
54
|
+
if not self.transaction == None:
|
|
55
|
+
self.transaction.commit()
|
|
56
|
+
|
|
57
|
+
if not self.conn == None:
|
|
58
|
+
self.conn.close()
|
|
59
|
+
self.conn = None
|
|
60
|
+
self.transaction = None
|
|
61
|
+
|
|
62
|
+
def rollback(self):
|
|
63
|
+
"""
|
|
64
|
+
To be called if there is an exception and you want to roll back the
|
|
65
|
+
transaction and return the connection to the pool
|
|
66
|
+
"""
|
|
67
|
+
if self.transaction:
|
|
68
|
+
self.transaction.rollback()
|
|
69
|
+
|
|
70
|
+
if self.conn:
|
|
71
|
+
self.conn.close()
|
|
72
|
+
|
|
73
|
+
self.conn = None
|
|
74
|
+
self.transaction = None
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
def rollbackForError(self):
|
|
78
|
+
"""
|
|
79
|
+
This is called when handling a major exception. This is because sometimes
|
|
80
|
+
you can end up in a situation where the transaction appears open, but is not. In
|
|
81
|
+
this case, calling a rollback on the transaction will cause an exception, which
|
|
82
|
+
then destroys all logging and shutdown of the actual code.
|
|
83
|
+
|
|
84
|
+
Use only in components.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
try:
|
|
88
|
+
self.rollback()
|
|
89
|
+
except:
|
|
90
|
+
pass
|
|
91
|
+
return
|