1 from __future__
import print_function
10 MAXWORKFLOWLENGTH = 81
14 print(
'Not injecting to wmagent in --show mode. Need to run the worklfows.')
16 if opt.wmcontrol==
'init':
19 if opt.wmcontrol==
'test':
22 if opt.wmcontrol==
'submit' and opt.nProcs==0:
23 print(
'Not injecting to wmagent in -j 0 mode. Need to run the worklfows.')
25 if opt.wmcontrol==
'force':
26 print(
"This is an expert setting, you'd better know what you're doing")
30 from modules.wma
import upload_to_couch
31 (filePath,labelInCouch,user,group,where) = arguments
32 cacheId=upload_to_couch(filePath,
48 for k
in options.split(
','):
49 if k.startswith(
'dqm:'):
50 self.
dqmgui=k.split(
':',1)[-1]
51 elif k.startswith(
'wma:'):
54 self.
testMode=((mode!=
'submit')
and (mode!=
'force'))
67 self.
wmagent=os.getenv(
'WMAGENT_REQMGR')
73 self.
wmagent =
'cmsweb-testbed.cern.ch'
74 self.
DbsUrl =
"https://"+self.
wmagent+
"/dbs/int/global/DBSReader"
77 self.
dqmgui=
"https://cmsweb.cern.ch/dqm/relval"
82 self.
user = os.getenv(
'USER')
90 if not os.getenv(
'WMCORE_ROOT'):
91 print(
'\n\twmclient is not setup properly. Will not be able to upload or submit requests.\n')
96 print(
'\n\tFound wmclient\n')
99 "RequestType" :
"TaskChain",
100 "SubRequestType" :
"RelVal",
101 "RequestPriority": 500000,
102 "Requestor": self.
user,
104 "CMSSWVersion": os.getenv(
'CMSSW_VERSION'),
105 "Campaign": os.getenv(
'CMSSW_VERSION'),
106 "ScramArch": os.getenv(
'SCRAM_ARCH'),
107 "ProcessingVersion": self.
version,
109 "ConfigCacheUrl": self.
couch,
117 "SizePerEvent" : 1234,
119 "PrepID": os.getenv(
'CMSSW_VERSION')
123 "EnableHarvesting" :
"True",
124 "DQMUploadUrl" : self.
dqmgui,
125 "DQMConfigCacheID" :
None,
131 "ConfigCacheID" :
None,
133 "SplittingAlgo" :
"EventBased",
134 "EventsPerJob" :
None,
135 "EventsPerLumi" :
None,
136 "RequestNumEvents" :
None,
137 "Seeding" :
"AutomaticSeeding",
138 "PrimaryDataset" :
None,
140 "Multicore" : opt.nThreads,
144 "TaskName" :
"DigiHLT",
145 "ConfigCacheID" :
None,
147 "InputDataset" :
None,
148 "SplittingAlgo" :
"LumiBased",
151 "Multicore" : opt.nThreads,
157 "InputFromOutputModule" :
None,
158 "ConfigCacheID" :
None,
160 "SplittingAlgo" :
"LumiBased",
163 "Multicore" : opt.nThreads,
173 Return a "wmsplit" dictionary that contain non-default LumisPerJob values
182 wmsplit[
'RECODreHLT']=2
186 wmsplit[
'DIGIUP15_PU50']=1
187 wmsplit[
'RECOUP15_PU50']=1
188 wmsplit[
'DIGIUP15_PU25']=1
189 wmsplit[
'RECOUP15_PU25']=1
190 wmsplit[
'DIGIUP15_PU25HS']=1
191 wmsplit[
'RECOUP15_PU25HS']=1
192 wmsplit[
'DIGIHIMIX']=5
193 wmsplit[
'RECOHIMIX']=5
194 wmsplit[
'RECODSplit']=1
195 wmsplit[
'SingleMuPt10_UP15_ID']=1
196 wmsplit[
'DIGIUP15_ID']=1
197 wmsplit[
'RECOUP15_ID']=1
198 wmsplit[
'TTbar_13_ID']=1
199 wmsplit[
'SingleMuPt10FS_ID']=1
200 wmsplit[
'TTbarFS_ID']=1
201 wmsplit[
'RECODR2_50nsreHLT']=5
202 wmsplit[
'RECODR2_25nsreHLT']=5
203 wmsplit[
'RECODR2_2016reHLT']=5
204 wmsplit[
'RECODR2_50nsreHLT_HIPM']=5
205 wmsplit[
'RECODR2_25nsreHLT_HIPM']=5
206 wmsplit[
'RECODR2_2016reHLT_HIPM']=1
207 wmsplit[
'RECODR2_2016reHLT_skimSingleMu']=1
208 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG']=1
209 wmsplit[
'RECODR2_2016reHLT_skimMuonEG']=1
210 wmsplit[
'RECODR2_2016reHLT_skimJetHT']=1
211 wmsplit[
'RECODR2_2016reHLT_skimMET']=1
212 wmsplit[
'RECODR2_2016reHLT_skimSinglePh']=1
213 wmsplit[
'RECODR2_2016reHLT_skimMuOnia']=1
214 wmsplit[
'RECODR2_2016reHLT_skimSingleMu_HIPM']=1
215 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG_HIPM']=1
216 wmsplit[
'RECODR2_2016reHLT_skimMuonEG_HIPM']=1
217 wmsplit[
'RECODR2_2016reHLT_skimJetHT_HIPM']=1
218 wmsplit[
'RECODR2_2016reHLT_skimMET_HIPM']=1
219 wmsplit[
'RECODR2_2016reHLT_skimSinglePh_HIPM']=1
220 wmsplit[
'RECODR2_2016reHLT_skimMuOnia_HIPM']=1
221 wmsplit[
'RECODR2_2017reHLT_Prompt']=1
222 wmsplit[
'RECODR2_2017reHLT_skimSingleMu_Prompt_Lumi']=1
223 wmsplit[
'RECODR2_2017reHLT_skimDoubleEG_Prompt']=1
224 wmsplit[
'RECODR2_2017reHLT_skimMET_Prompt']=1
225 wmsplit[
'RECODR2_2017reHLT_skimMuOnia_Prompt']=1
226 wmsplit[
'RECODR2_2017reHLT_Prompt_L1TEgDQM']=1
227 wmsplit[
'RECODR2_2018reHLT_Prompt']=1
228 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Prompt_Lumi']=1
229 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Prompt']=1
230 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt']=1
231 wmsplit[
'RECODR2_2018reHLT_skimMET_Prompt']=1
232 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Prompt']=1
233 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Prompt_L1TEgDQM']=1
234 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Prompt']=1
235 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Prompt']=1
236 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_HEfail']=1
237 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_BadHcalMitig']=1
238 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Prompt']=1
239 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Prompt']=1
240 wmsplit[
'RECODR2_2018reHLT_ZBPrompt']=1
241 wmsplit[
'RECODR2_2018reHLT_Offline']=1
242 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Offline_Lumi']=1
243 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Offline']=1
244 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline']=1
245 wmsplit[
'RECODR2_2018reHLT_skimMET_Offline']=1
246 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Offline']=1
247 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Offline_L1TEgDQM']=1
248 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Offline']=1
249 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Offline']=1
250 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_HEfail']=1
251 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_BadHcalMitig']=1
252 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Offline']=1
253 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Offline']=1
254 wmsplit[
'RECODR2_2018reHLT_ZBOffline']=1
255 wmsplit[
'HLTDR2_50ns']=1
256 wmsplit[
'HLTDR2_25ns']=1
257 wmsplit[
'HLTDR2_2016']=1
258 wmsplit[
'HLTDR2_2017']=1
259 wmsplit[
'HLTDR2_2018']=1
260 wmsplit[
'HLTDR2_2018_BadHcalMitig']=1
261 wmsplit[
'Hadronizer']=1
262 wmsplit[
'DIGIUP15']=1
263 wmsplit[
'RECOUP15']=1
264 wmsplit[
'RECOAODUP15']=5
265 wmsplit[
'DBLMINIAODMCUP15NODQM']=5
266 wmsplit[
'DigiFull']=5
267 wmsplit[
'RecoFull']=5
268 wmsplit[
'DigiFullPU']=1
269 wmsplit[
'RecoFullPU']=1
270 wmsplit[
'RECOHID11']=1
271 wmsplit[
'DigiFullTriggerPU_2026D17PU'] = 1
272 wmsplit[
'RecoFullGlobalPU_2026D17PU']=1
273 wmsplit[
'DIGIUP17']=1
274 wmsplit[
'RECOUP17']=1
275 wmsplit[
'DIGIUP17_PU25']=1
276 wmsplit[
'RECOUP17_PU25']=1
277 wmsplit[
'DIGICOS_UP16']=1
278 wmsplit[
'RECOCOS_UP16']=1
279 wmsplit[
'DIGICOS_UP17']=1
280 wmsplit[
'RECOCOS_UP17']=1
281 wmsplit[
'DIGICOS_UP18']=1
282 wmsplit[
'RECOCOS_UP18']=1
283 wmsplit[
'DIGICOS_UP21']=1
284 wmsplit[
'RECOCOS_UP21']=1
285 wmsplit[
'HYBRIDRepackHI2015VR']=1
286 wmsplit[
'HYBRIDZSHI2015']=1
287 wmsplit[
'RECOHID15']=1
288 wmsplit[
'RECOHID18']=1
289 wmsplit[
'DigiFullTriggerPU_2026D35PU'] = 1
290 wmsplit[
'RecoFullGlobalPU_2026D35PU']=1
291 wmsplit[
'DigiFullTriggerPU_2026D41PU'] = 1
292 wmsplit[
'RecoFullGlobalPU_2026D41PU']=1
293 wmsplit[
'DigiFullTriggerPU_2026D43PU'] = 1
294 wmsplit[
'RecoFullGlobalPU_2026D43PU']=1
295 wmsplit[
'DigiFullTriggerPU_2026D44PU'] = 1
296 wmsplit[
'RecoFullGlobalPU_2026D44PU']=1
297 wmsplit[
'DigiFullTriggerPU_2026D45PU'] = 1
298 wmsplit[
'RecoFullGlobalPU_2026D45PU']=1
299 wmsplit[
'DigiFullTriggerPU_2026D46PU'] = 1
300 wmsplit[
'RecoFullGlobalPU_2026D46PU']=1
301 wmsplit[
'DigiFullTriggerPU_2026D47PU'] = 1
302 wmsplit[
'RecoFullGlobalPU_2026D47PU']=1
303 wmsplit[
'DigiFullTriggerPU_2026D48PU'] = 1
304 wmsplit[
'RecoFullGlobalPU_2026D48PU']=1
305 wmsplit[
'DigiFullTriggerPU_2026D49PU'] = 1
306 wmsplit[
'RecoFullGlobalPU_2026D49PU']=1
307 wmsplit[
'DigiFullTriggerPU_2026D50PU'] = 1
308 wmsplit[
'RecoFullGlobalPU_2026D50PU']=1
309 wmsplit[
'DigiFullTriggerPU_2026D51PU'] = 1
310 wmsplit[
'RecoFullGlobalPU_2026D51PU']=1
311 wmsplit[
'DigiFullTriggerPU_2026D52PU'] = 1
312 wmsplit[
'RecoFullGlobalPU_2026D52PU']=1
313 wmsplit[
'DigiFullTriggerPU_2026D57PU'] = 1
314 wmsplit[
'RecoFullGlobalPU_2026D57PU']=1
315 wmsplit[
'DigiFullTriggerPU_2026D58PU'] = 1
316 wmsplit[
'RecoFullGlobalPU_2026D58PU']=1
317 except Exception
as ex:
318 print(
'Exception while building a wmsplit dictionary: %s' % (
str(ex)))
323 def prepare(self,mReader, directories, mode='init'):
324 wmsplit = MatrixInjector.get_wmsplit()
326 for (n,dir)
in directories.items():
328 print(
"inspecting",dir)
330 for (x,s)
in mReader.workFlowSteps.items():
340 if len( [step
for step
in s[3]
if "HARVESTGEN" in step] )>0:
341 chainDict[
'TimePerEvent']=0.01
342 thisLabel=thisLabel+
"_gen"
344 if len( [step
for step
in s[3]
if "DBLMINIAODMCUP15NODQM" in step] )>0:
345 thisLabel=thisLabel+
"_dblMiniAOD"
351 if 'INPUT' in step
or (
not isinstance(s[2][index],str)):
352 nextHasDSInput=s[2][index]
360 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
362 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
365 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=
'RelVal'+s[1].
split(
'+')[0]
366 if not '--relval' in s[2][index]:
367 print(
'Impossible to create task from scratch without splitting information with --relval')
370 arg=s[2][index].
split()
372 chainDict[
'nowmTasklist'][-1][
'RequestNumEvents'] = ns[0]
373 chainDict[
'nowmTasklist'][-1][
'EventsPerJob'] = ns[1]
374 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] = ns[1]
376 if 'numberEventsInLuminosityBlock' in s[2][index]:
377 nEventsInLuminosityBlock = re.findall(
'process.source.numberEventsInLuminosityBlock=cms.untracked.uint32\(([ 0-9 ]*)\)', s[2][index],re.DOTALL)
378 if nEventsInLuminosityBlock[-1].isdigit()
and int(nEventsInLuminosityBlock[-1]) < ns[1]:
379 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] =
int(nEventsInLuminosityBlock[-1])
382 if 'FASTSIM' in s[2][index]
or '--fast' in s[2][index]:
383 thisLabel+=
'_FastSim'
384 if 'lhe' in s[2][index]
in s[2][index]:
385 chainDict[
'nowmTasklist'][-1][
'LheInputFiles'] =
True
390 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
392 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
394 chainDict[
'nowmTasklist'][-1][
'InputDataset']=nextHasDSInput.dataSet
395 if (
'DQMHLTonRAWAOD' in step) :
396 chainDict[
'nowmTasklist'][-1][
'IncludeParents']=
True
397 splitForThisWf=nextHasDSInput.split
398 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
400 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
402 if len(nextHasDSInput.run):
403 chainDict[
'nowmTasklist'][-1][
'RunWhitelist']=nextHasDSInput.run
404 if len(nextHasDSInput.ls):
405 chainDict[
'nowmTasklist'][-1][
'LumiList']=nextHasDSInput.ls
407 if '--data' in s[2][index]
and nextHasDSInput.label:
408 thisLabel+=
'_RelVal_%s'%nextHasDSInput.label
409 if 'filter' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
410 print(
"This has an input DS and a filter sequence: very likely to be the PyQuen sample")
411 processStrPrefix=
'PU_'
412 setPrimaryDs =
'RelVal'+s[1].
split(
'+')[0]
414 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
420 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
422 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
425 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
427 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
430 if 'Hadronizer' in step:
431 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[
'Hadronizer']
434 chainDict[
'nowmTasklist'][-1][
'TaskName']=step
436 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
437 chainDict[
'nowmTasklist'][-1][
'ConfigCacheID']=
'%s/%s.py'%(dir,step)
438 chainDict[
'nowmTasklist'][-1][
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
439 chainDict[
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
440 if 'NANOEDM' in step :
441 nanoedmGT = chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
442 if 'NANOMERGE' in step :
443 chainDict[
'GlobalTag'] = nanoedmGT
444 if 'pileup' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
445 chainDict[
'nowmTasklist'][-1][
'MCPileup']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'pileup']
446 if '--pileup ' in s[2][index]:
447 processStrPrefix=
'PU_'
449 processStrPrefix=
'PU25ns_'
451 processStrPrefix=
'PU50ns_'
452 if 'premix_stage2' in s[2][index]
and '--pileup_input' in s[2][index]:
454 processStrPrefix=
'PUpmx25ns_'
455 elif s[2][index].
split()[ s[2][index].
split().
index(
'--pileup_input')+1 ].
find(
'50ns') > 0 :
456 processStrPrefix=
'PUpmx50ns_'
460 chainDict[
'AcquisitionEra'][step]=chainDict[
'CMSSWVersion']
461 chainDict[
'ProcessingString'][step]=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
462 if 'NANOMERGE' in step :
463 chainDict[
'ProcessingString'][step]=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
466 chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']=chainDict[
'CMSSWVersion']
467 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
468 if 'NANOMERGE' in step :
469 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
472 chainDict[
'nowmTasklist'][-1][
'Campaign'] = chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']+self.
batchName
475 if (
'DBLMINIAODMCUP15NODQM' in step):
476 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=chainDict[
'nowmTasklist'][-1][
'ProcessingString']+
'_miniAOD'
478 if( chainDict[
'nowmTasklist'][-1][
'Multicore'] ):
485 chainDict[
'nowmTasklist'][-1][
'Memory'] = self.
memoryOffset +
int( chainDict[
'nowmTasklist'][-1][
'Multicore'] -1 ) * self.
memPerCore
489 chainDict[
'RequestString']=
'RV'+chainDict[
'CMSSWVersion']+s[1].
split(
'+')[0]
490 if processStrPrefix
or thisLabel:
491 chainDict[
'RequestString']+=
'_'+processStrPrefix+thisLabel
498 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+
'__'+self.
batchTime+
'-'+s[1].
split(
'+')[0]
500 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+self.
batchName+
'-'+s[1].
split(
'+')[0]
502 chainDict[
'SubRequestType'] =
"HIRelVal"
509 for i_second
in reversed(
range(len(chainDict[
'nowmTasklist']))):
510 t_second=chainDict[
'nowmTasklist'][i_second]
512 if 'primary' in t_second[
'nowmIO']:
514 primary=t_second[
'nowmIO'][
'primary'][0].
replace(
'file:',
'')
515 for i_input
in reversed(
range(0,i_second)):
516 t_input=chainDict[
'nowmTasklist'][i_input]
517 for (om,o)
in t_input[
'nowmIO'].
items():
521 if (len(t_input[
'TaskName'])>50):
522 if (t_input[
'TaskName'].
find(
'GenSim') != -1):
523 t_input[
'TaskName'] =
'GenSimFull'
524 if (t_input[
'TaskName'].
find(
'Hadronizer') != -1):
525 t_input[
'TaskName'] =
'HadronizerFull'
526 t_second[
'InputTask'] = t_input[
'TaskName']
527 t_second[
'InputFromOutputModule'] = om
529 if t_second[
'TaskName'].startswith(
'HARVEST'):
531 if "_RD" in t_second[
'TaskName']:
532 chainDict[
'DQMHarvestUnit'] =
"multiRun"
533 chainDict[
'DQMConfigCacheID']=t_second[
'ConfigCacheID']
553 chainDict[
'AcquisitionEra'] = chainDict[
'AcquisitionEra'].
values()[0]
554 chainDict[
'ProcessingString'] = chainDict[
'ProcessingString'].
values()[0]
556 chainDict[
'AcquisitionEra'] = chainDict[
'nowmTasklist'][0][
'AcquisitionEra']
557 chainDict[
'ProcessingString'] = chainDict[
'nowmTasklist'][0][
'ProcessingString']
561 chainDict[
'Campaign'] = chainDict[
'AcquisitionEra']+self.
batchName
567 if isinstance(i, int)
and i < len(chainDict[
'nowmTasklist']):
568 chainDict[
'nowmTasklist'][i][
'KeepOutput']=
True
569 for (i,t)
in enumerate(chainDict[
'nowmTasklist']):
570 if t[
'TaskName'].startswith(
'HARVEST'):
574 elif t[
'TaskName']
in self.
keep:
576 if t[
'TaskName'].startswith(
'HYBRIDRepackHI2015VR'):
577 t[
'KeepOutput']=
False
580 chainDict[
'Task%d'%(itask)]=t
587 chainDict[
'TaskChain']=itask
589 chainDict.pop(
'nowmTasklist')
596 labelInCouch=self.
label+
'_'+label
597 cacheName=filePath.split(
'/')[-1]
600 print(
'\tFake upload of',filePath,
'to couch with label',labelInCouch)
604 from modules.wma
import upload_to_couch,DATABASE_NAME
606 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
611 print(
"Not re-uploading",filePath,
"to",where,
"for",label)
614 print(
"Loading",filePath,
"to",where,
"for",label)
616 pool = multiprocessing.Pool(1)
617 cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.
user,self.
group,where)] )
618 cacheId = cacheIds[0]
625 if it.startswith(
"Task")
and it!=
'TaskChain':
627 couchID=self.
uploadConf(d[it][
'ConfigCacheID'],
628 str(n)+d[it][
'TaskName'],
631 print(d[it][
'ConfigCacheID'],
" uploaded to couchDB for",
str(n),
"with ID",couchID)
632 d[it][
'ConfigCacheID']=couchID
633 if it ==
'DQMConfigCacheID':
634 couchID=self.
uploadConf(d[
'DQMConfigCacheID'],
638 print(d[
'DQMConfigCacheID'],
"uploaded to couchDB for",
str(n),
"with ID",couchID)
639 d[
'DQMConfigCacheID']=couchID
644 from modules.wma
import makeRequest,approveRequest
645 from wmcontrol
import random_sleep
646 print(
'\n\tFound wmcontrol\n')
648 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
656 print(
"Only viewing request",n)
657 print(pprint.pprint(d))
660 print(
"For eyes before submitting",n)
661 print(pprint.pprint(d))
662 print(
"Submitting",n,
"...........")
663 workFlow=makeRequest(self.
wmagent,d,encodeDict=
True)
664 print(
"...........",n,
"submitted")
667 print(
"\n*** WARNING: "+
str(len(self.
longWFName))+
" workflows have too long names for submission (>"+
str(MAXWORKFLOWLENGTH)+
"characters) ***")