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,153 @@
|
|
|
1
|
+
function(head, req) {
|
|
2
|
+
|
|
3
|
+
// Apply restrictions provided in query to find elements that can run
|
|
4
|
+
// at the given sites.
|
|
5
|
+
|
|
6
|
+
// Include checks on data location, site white/blacklists & team.
|
|
7
|
+
|
|
8
|
+
// Return at least one element for each site with free job slots,
|
|
9
|
+
// then take element size into account for further allocation.
|
|
10
|
+
|
|
11
|
+
if (!req.query.resources) {
|
|
12
|
+
send(toJSON({}));
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
var num_elem = JSON.parse(req.query.num_elem);
|
|
18
|
+
} catch (ex) {
|
|
19
|
+
send('"Error parsing number of elements" ' + req.query.num_elem);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
var resources = JSON.parse(req.query.resources);
|
|
25
|
+
} catch (ex) {
|
|
26
|
+
send('"Error parsing resources" ' + req.query.resources);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var team = "";
|
|
31
|
+
if (req.query.team) {
|
|
32
|
+
try {
|
|
33
|
+
team = JSON.parse(req.query.team);
|
|
34
|
+
} catch (ex) {
|
|
35
|
+
send('"Error parsing team" ' + req.query.team);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var wfs = [];
|
|
41
|
+
if (req.query.wfs) {
|
|
42
|
+
try {
|
|
43
|
+
wfs = JSON.parse(req.query.wfs);
|
|
44
|
+
} catch (ex) {
|
|
45
|
+
send('"Error parsing wfs" ' + req.query.wfs);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
send("[");
|
|
51
|
+
// loop over elements, applying site restrictions
|
|
52
|
+
var first = true;
|
|
53
|
+
while (row = getRow()) {
|
|
54
|
+
|
|
55
|
+
if (resources.length == 0) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (num_elem <= 0) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//in case document is already deleted
|
|
64
|
+
if (!row.doc) {
|
|
65
|
+
continue;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var ele = row["doc"]["WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement"];
|
|
69
|
+
|
|
70
|
+
// check work is for a team in the request
|
|
71
|
+
if (team && ele["TeamName"] && team !== ele["TeamName"]) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// skip if we only want work from certain wf's which don't include this one.
|
|
76
|
+
if (wfs.length && wfs.indexOf(ele["RequestName"]) == -1) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
for (var site in resources) {
|
|
81
|
+
// skip if in blacklist
|
|
82
|
+
if (ele["SiteBlacklist"].indexOf(site) !== -1) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//skip if not in whitelist
|
|
87
|
+
if (ele["SiteWhitelist"].indexOf(site) === -1) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Input data location restrictions
|
|
92
|
+
// don't check input data location if trustSitelists is enabled
|
|
93
|
+
var noInputSite = false;
|
|
94
|
+
if (ele["NoInputUpdate"] === true) {
|
|
95
|
+
noInputSite = false;
|
|
96
|
+
} else if (ele["Inputs"]) {
|
|
97
|
+
for (block in ele['Inputs']) {
|
|
98
|
+
if (ele['Inputs'][block].indexOf(site) === -1) {
|
|
99
|
+
noInputSite = true;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (noInputSite) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Pileup data location restrictions, all pileup datasets must be at the site
|
|
109
|
+
// don't check pileup data location if trustPUSitelists
|
|
110
|
+
var noPileupSite = false;
|
|
111
|
+
if (ele["NoPileupUpdate"] === true) {
|
|
112
|
+
noPileupSite = false;
|
|
113
|
+
} else if (ele["PileupData"]) {
|
|
114
|
+
for(dataset in ele["PileupData"]) {
|
|
115
|
+
if(ele["PileupData"][dataset].indexOf(site) === -1) {
|
|
116
|
+
noPileupSite = true;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (noPileupSite){
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
//skip if parent processing flag is set and parent block is not in the site.
|
|
126
|
+
//all the parent block has to be in the same site
|
|
127
|
+
var noParentSite = false;
|
|
128
|
+
if (ele["NoInputUpdate"] === true) {
|
|
129
|
+
noParentSite = false;
|
|
130
|
+
} else if (ele["ParentFlag"]) {
|
|
131
|
+
for (block in ele["ParentData"]) {
|
|
132
|
+
if (ele["ParentData"][block].indexOf(site) === -1) {
|
|
133
|
+
noParentSite = true;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (noParentSite) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (first !== true) {
|
|
143
|
+
send(",");
|
|
144
|
+
}
|
|
145
|
+
send(toJSON(row["doc"])); // need whole document, id etc...
|
|
146
|
+
first = false; // from now on prepend "," to output
|
|
147
|
+
num_elem--; // decrement the counter for the number of elements
|
|
148
|
+
break; // we have work, move to next element (break out of site loop)
|
|
149
|
+
} // end resources
|
|
150
|
+
} // end rows
|
|
151
|
+
|
|
152
|
+
send("]");
|
|
153
|
+
} // end function
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function(head, req) {
|
|
2
|
+
// this function is used for elementsDetailByWorkflowAndStatus
|
|
3
|
+
var mainDoc = this;
|
|
4
|
+
provides("html", function() {
|
|
5
|
+
var Mustache = require("lib/mustache");
|
|
6
|
+
var requestInfo;
|
|
7
|
+
if (req.query.key) {
|
|
8
|
+
requestInfo = {request: req.query.key};
|
|
9
|
+
} else {
|
|
10
|
+
requestInfo = {request: ""};
|
|
11
|
+
}
|
|
12
|
+
return Mustache.to_html(mainDoc.templates.WorkflowSummary,
|
|
13
|
+
requestInfo, mainDoc.templates.partials, send);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
provides("json", function() {
|
|
17
|
+
send("[");
|
|
18
|
+
var row = getRow();
|
|
19
|
+
if (row) {
|
|
20
|
+
send(toJSON(row.value));
|
|
21
|
+
while (row = getRow()){
|
|
22
|
+
send(",");
|
|
23
|
+
send(toJSON(row.value));
|
|
24
|
+
}
|
|
25
|
+
}// end rows
|
|
26
|
+
send("]");
|
|
27
|
+
});
|
|
28
|
+
} // end function
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[
|
|
2
|
+
{"from": "elementsInfo",
|
|
3
|
+
"to": "_list/elementsDetail/elementsDetailByWorkflowAndStatus",
|
|
4
|
+
"method": "GET",
|
|
5
|
+
"query": {"startkey": [":request"],
|
|
6
|
+
"endkey": [":request", {}],
|
|
7
|
+
"reduce": "false"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
{"from": "workflowInfo",
|
|
12
|
+
"to": "_list/workflowSummary/workflowSummary",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"query": {"group": "true"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
{"from": "stuckElementsInfo",
|
|
19
|
+
"to": "_list/stuckElements/stuckElements",
|
|
20
|
+
"method": "GET",
|
|
21
|
+
"query" : {"include_docs" : "true"}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
"from": "index.html",
|
|
26
|
+
"to": "index.html"
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
{
|
|
30
|
+
"from": "",
|
|
31
|
+
"to": "_show/redirect"
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
{
|
|
35
|
+
"from": "vendor/*",
|
|
36
|
+
"to": "vendor/*"
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
"from": "config/*",
|
|
41
|
+
"to": "config/*"
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
"from": "_view/*",
|
|
46
|
+
"to": "_view/*"
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
"from": "_list/*",
|
|
51
|
+
"to": "_list/*"
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
{
|
|
55
|
+
"from": "_show/*",
|
|
56
|
+
"to": "_show/*"
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
"from": "_update/*",
|
|
61
|
+
"to": "_update/*"
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
{
|
|
65
|
+
"from": "js/*",
|
|
66
|
+
"to": "js/*"
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
{
|
|
70
|
+
"from": "element/:id",
|
|
71
|
+
"to": "../../:id"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function(doc, req) {
|
|
2
|
+
// redirect from _rewrite to index.html - only call this from _rewrite
|
|
3
|
+
// See http://wiki.apache.org/couchdb/Throw%20a%20404%20or%20a%20redirect
|
|
4
|
+
if (req.headers['Cms-Request-Uri']) {
|
|
5
|
+
// we are behind a cms frontend which is proxying requests
|
|
6
|
+
var http = req.headers.Https === 'on' ? 'https://' : 'http://';
|
|
7
|
+
var uri = req.headers['Cms-Request-Uri'];
|
|
8
|
+
if (uri.length > 0) {
|
|
9
|
+
uri = uri[uri.length - 1] === '/' ? uri : uri + '/';
|
|
10
|
+
}
|
|
11
|
+
var location = http + req.headers['X-Forwarded-Host'] + uri + 'index.html';
|
|
12
|
+
} else {
|
|
13
|
+
// assemble uri from path - assume http
|
|
14
|
+
req.path.pop(); req.path.pop(); // need to remove '_show/redirect' from uri
|
|
15
|
+
var location = 'http://' + req.headers.Host + '/' + req.path.join('/') + '/_rewrite/index.html';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var redirect = {code : 301,
|
|
19
|
+
headers : {"Location" : location
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return redirect;
|
|
23
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function(doc, req) {
|
|
2
|
+
var mainDoc = this
|
|
3
|
+
var data = {tasks : []}
|
|
4
|
+
var now = new Date()
|
|
5
|
+
|
|
6
|
+
for (var name in doc.tasks) {
|
|
7
|
+
if (doc.tasks.hasOwnProperty(name) === false) {
|
|
8
|
+
continue;
|
|
9
|
+
}
|
|
10
|
+
var task = doc.tasks[name]
|
|
11
|
+
// convert {} to [] - must be a better way...
|
|
12
|
+
task['name'] = name;
|
|
13
|
+
// convert time stamp to Date object
|
|
14
|
+
var timestamp = new Date(task['timestamp'] * 1000);
|
|
15
|
+
task['timestamp'] = timestamp.toUTCString();
|
|
16
|
+
// mark if not run recently (2 hours)
|
|
17
|
+
if ((now - timestamp) < 7200000) {
|
|
18
|
+
task['uptodate'] = true
|
|
19
|
+
}
|
|
20
|
+
data.tasks.push(doc.tasks[name]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
provides("html", function() {
|
|
24
|
+
var Mustache = require("lib/mustache");
|
|
25
|
+
html_out = Mustache.to_html(mainDoc.templates.TaskStatus, data);
|
|
26
|
+
return {body : html_out,
|
|
27
|
+
headers: {
|
|
28
|
+
"Content-Type": "text/html",
|
|
29
|
+
"Cache-Control" : "no-cache" // need to recompute even if etag the same
|
|
30
|
+
}};
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
provides("json", function() {
|
|
34
|
+
return {body : toJSON(data),
|
|
35
|
+
headers: {
|
|
36
|
+
"Content-Type": "application/json",
|
|
37
|
+
"Cache-Control" : "no-cache" // need to recompute even if etag the same
|
|
38
|
+
}};
|
|
39
|
+
})
|
|
40
|
+
} // end function
|
wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/ElementSummaryByWorkflow.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title> {{request}} : WorkQueue Elements</title>
|
|
5
|
+
<!--YUI Library -->
|
|
6
|
+
{{>yui-lib}}
|
|
7
|
+
|
|
8
|
+
<!-- WorkQueue library -->
|
|
9
|
+
{{>workqueue-common-lib}}
|
|
10
|
+
|
|
11
|
+
<script src="js/ElementInfoByWorkflow.js"></script>
|
|
12
|
+
|
|
13
|
+
</head>
|
|
14
|
+
<body class="yui-skin-sam">
|
|
15
|
+
<h3> Workqueue Elements for {{request}} </h3>
|
|
16
|
+
<div id="elements"></div>
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
var oArgs = {};
|
|
20
|
+
oArgs.divID = "elements";
|
|
21
|
+
oArgs.workflow = "{{{request}}}";
|
|
22
|
+
|
|
23
|
+
WQ.ElementInfoByWorkflow.elementTable(oArgs);
|
|
24
|
+
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title> Stuck WorkQueue Elements</title>
|
|
5
|
+
<!--YUI Library -->
|
|
6
|
+
{{>yui-lib}}
|
|
7
|
+
|
|
8
|
+
<!-- WorkQueue library -->
|
|
9
|
+
{{>workqueue-common-lib}}
|
|
10
|
+
|
|
11
|
+
<script src="js/StuckElementInfo.js"></script>
|
|
12
|
+
|
|
13
|
+
</head>
|
|
14
|
+
<body class="yui-skin-sam">
|
|
15
|
+
<h3> Stuck Workqueue Elements </h3>
|
|
16
|
+
<div id="elements"></div>
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
var oArgs = {};
|
|
20
|
+
oArgs.divID = "elements";
|
|
21
|
+
|
|
22
|
+
WQ.StuckElementInfo.elementTable(oArgs);
|
|
23
|
+
|
|
24
|
+
</script>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>WorkQueue task status</title>
|
|
5
|
+
</head>
|
|
6
|
+
<body>
|
|
7
|
+
<h3>Status of periodic tasks</h3>
|
|
8
|
+
<div id="tasks">
|
|
9
|
+
<table cellspacing="10" align="center">
|
|
10
|
+
<th>Name</th><th>Last run</th><th>Status</th><th>Info</th>
|
|
11
|
+
{{#tasks}}
|
|
12
|
+
<tr>
|
|
13
|
+
<td>{{name}}</td><td>{{timestamp}}</td>
|
|
14
|
+
<td>{{#uptodate}}ok{{/uptodate}}{{^uptodate}}ERROR! Task not run recently{{/uptodate}}</td>
|
|
15
|
+
<td>{{comment}}</td>
|
|
16
|
+
</tr>
|
|
17
|
+
{{/tasks}}
|
|
18
|
+
|
|
19
|
+
</table>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title> {{request}} : Workflow Summary</title>
|
|
5
|
+
<!--YUI Library -->
|
|
6
|
+
{{>yui-lib}}
|
|
7
|
+
|
|
8
|
+
<!-- WorkQueue library -->
|
|
9
|
+
{{>workqueue-common-lib}}
|
|
10
|
+
|
|
11
|
+
<script src="js/WorkloadInfoTable.js"></script>
|
|
12
|
+
|
|
13
|
+
</head>
|
|
14
|
+
<body class="yui-skin-sam">
|
|
15
|
+
<h3> Workflow Summary for {{request}} </h3>
|
|
16
|
+
<div id="workflow"></div>
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
var oArgs = {};
|
|
20
|
+
oArgs.divID = "workflow";
|
|
21
|
+
oArgs.workflow = "{{{request}}}";
|
|
22
|
+
|
|
23
|
+
WQ.WorkloadInfoTable.workloadTable(oArgs);
|
|
24
|
+
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
wmglobalqueue-2.4.5.1.data/data/data/couchapps/WorkQueue/templates/partials/yui-lib-remote.html
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- YAHOO YUI Library -->
|
|
2
|
+
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/fonts/fonts-min.css" />
|
|
3
|
+
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/paginator/assets/skins/sam/paginator.css" />
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/datatable/assets/skins/sam/datatable.css" />
|
|
5
|
+
<!--
|
|
6
|
+
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/connection/connection-min.js&2.8.0r4/build/datasource/datasource-min.js&2.8.0r4/build/datatable/datatable-min.js&2.8.0r4/build/json/json-min.js"></script>
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
|
10
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/dragdrop/dragdrop-min.js"></script>
|
|
11
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/connection/connection-min.js"></script>
|
|
12
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/element/element-min.js"></script>
|
|
13
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/datasource/datasource-min.js"></script>
|
|
14
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/datatable/datatable-min.js"></script>
|
|
15
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/json/json-min.js"></script>
|
|
16
|
+
<script src="http://yui.yahooapis.com/2.8.0r4/build/paginator/paginator-min.js"></script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- YAHOO YUI Library -->
|
|
2
|
+
<link rel="stylesheet" type="text/css" href="vendor/yui/build/fonts/fonts-min.css" />
|
|
3
|
+
<link rel="stylesheet" type="text/css" href="vendor/yui/build/paginator/assets/skins/sam/paginator.css" />
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="vendor/yui/build/datatable/assets/skins/sam/datatable.css" />
|
|
5
|
+
<link rel="stylesheet" type="text/css" href="vendor/yui/build/progressbar/assets/skins/sam/progressbar.css" />
|
|
6
|
+
<!--
|
|
7
|
+
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/connection/connection-min.js&2.8.0r4/build/datasource/datasource-min.js&2.8.0r4/build/datatable/datatable-min.js&2.8.0r4/build/json/json-min.js"></script>
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<script src="vendor/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
|
11
|
+
<script src="vendor/yui/build/dragdrop/dragdrop-min.js"></script>
|
|
12
|
+
<script src="vendor/yui/build/connection/connection-min.js"></script>
|
|
13
|
+
<script src="vendor/yui/build/element/element-min.js"></script>
|
|
14
|
+
<script src="vendor/yui/build/datasource/datasource-min.js"></script>
|
|
15
|
+
<script src="vendor/yui/build/datatable/datatable-min.js"></script>
|
|
16
|
+
<script src="vendor/yui/build/json/json-min.js"></script>
|
|
17
|
+
<script src="vendor/yui/build/paginator/paginator-min.js"></script>
|
|
18
|
+
<script src="vendor/yui/build/progressbar/progressbar-min.js"></script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// update arbitrary fields
|
|
2
|
+
// adapted from http://wiki.apache.org/couchdb/Document_Update_Handlers
|
|
3
|
+
function(doc, req) {
|
|
4
|
+
if (!req.query.updates) {
|
|
5
|
+
return [doc, '"No updates provided"'];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
var updates = JSON.parse(req.query.updates);
|
|
10
|
+
} catch (ex) {
|
|
11
|
+
return [doc, '"Error parsing JSON"'];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
var options = JSON.parse(req.query.options);
|
|
16
|
+
} catch (ex) {
|
|
17
|
+
return [doc, '"Error parsing JSON"'];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
for (var field in updates) {
|
|
21
|
+
var value = updates[field];
|
|
22
|
+
var ele = doc['WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement'];
|
|
23
|
+
|
|
24
|
+
// attempt to preserve type
|
|
25
|
+
var type = typeof(ele[field]);
|
|
26
|
+
if (type === "number") {
|
|
27
|
+
value = parseFloat(value);
|
|
28
|
+
}
|
|
29
|
+
// Check if we are doing incremental updates
|
|
30
|
+
// Currently only supports arrays
|
|
31
|
+
if ("incremental" in options && options["incremental"]){
|
|
32
|
+
if ((Object.prototype.toString.call(ele[field]) === '[object Array]')){
|
|
33
|
+
for(var i = 0; i < value.length; i++){
|
|
34
|
+
singleValue = value[i]
|
|
35
|
+
ele[field].push(singleValue)
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
// Unsupported type
|
|
39
|
+
ele[field] = value;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
ele[field] = value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//record update time
|
|
47
|
+
doc.updatetime = new Date().getTime() / 1000; // epoch seconds
|
|
48
|
+
|
|
49
|
+
return [doc, ''];
|
|
50
|
+
}
|