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,
170 def prepare(self,mReader, directories, mode='init'):
177 wmsplit[
'RECODreHLT']=2
181 wmsplit[
'DIGIUP15_PU50']=1
182 wmsplit[
'RECOUP15_PU50']=1
183 wmsplit[
'DIGIUP15_PU25']=1
184 wmsplit[
'RECOUP15_PU25']=1
185 wmsplit[
'DIGIUP15_PU25HS']=1
186 wmsplit[
'RECOUP15_PU25HS']=1
187 wmsplit[
'DIGIHIMIX']=5
188 wmsplit[
'RECOHIMIX']=5
189 wmsplit[
'RECODSplit']=1
190 wmsplit[
'SingleMuPt10_UP15_ID']=1
191 wmsplit[
'DIGIUP15_ID']=1
192 wmsplit[
'RECOUP15_ID']=1
193 wmsplit[
'TTbar_13_ID']=1
194 wmsplit[
'SingleMuPt10FS_ID']=1
195 wmsplit[
'TTbarFS_ID']=1
196 wmsplit[
'RECODR2_50nsreHLT']=5
197 wmsplit[
'RECODR2_25nsreHLT']=5
198 wmsplit[
'RECODR2_2016reHLT']=5
199 wmsplit[
'RECODR2_50nsreHLT_HIPM']=5
200 wmsplit[
'RECODR2_25nsreHLT_HIPM']=5
201 wmsplit[
'RECODR2_2016reHLT_HIPM']=1
202 wmsplit[
'RECODR2_2016reHLT_skimSingleMu']=1
203 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG']=1
204 wmsplit[
'RECODR2_2016reHLT_skimMuonEG']=1
205 wmsplit[
'RECODR2_2016reHLT_skimJetHT']=1
206 wmsplit[
'RECODR2_2016reHLT_skimMET']=1
207 wmsplit[
'RECODR2_2016reHLT_skimSinglePh']=1
208 wmsplit[
'RECODR2_2016reHLT_skimMuOnia']=1
209 wmsplit[
'RECODR2_2016reHLT_skimSingleMu_HIPM']=1
210 wmsplit[
'RECODR2_2016reHLT_skimDoubleEG_HIPM']=1
211 wmsplit[
'RECODR2_2016reHLT_skimMuonEG_HIPM']=1
212 wmsplit[
'RECODR2_2016reHLT_skimJetHT_HIPM']=1
213 wmsplit[
'RECODR2_2016reHLT_skimMET_HIPM']=1
214 wmsplit[
'RECODR2_2016reHLT_skimSinglePh_HIPM']=1
215 wmsplit[
'RECODR2_2016reHLT_skimMuOnia_HIPM']=1
216 wmsplit[
'RECODR2_2017reHLT_Prompt']=1
217 wmsplit[
'RECODR2_2017reHLT_skimSingleMu_Prompt_Lumi']=1
218 wmsplit[
'RECODR2_2017reHLT_skimDoubleEG_Prompt']=1
219 wmsplit[
'RECODR2_2017reHLT_skimMET_Prompt']=1
220 wmsplit[
'RECODR2_2017reHLT_skimMuOnia_Prompt']=1
221 wmsplit[
'RECODR2_2017reHLT_Prompt_L1TEgDQM']=1
222 wmsplit[
'RECODR2_2018reHLT_Prompt']=1
223 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Prompt_Lumi']=1
224 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Prompt']=1
225 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt']=1
226 wmsplit[
'RECODR2_2018reHLT_skimMET_Prompt']=1
227 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Prompt']=1
228 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Prompt_L1TEgDQM']=1
229 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Prompt']=1
230 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Prompt']=1
231 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_HEfail']=1
232 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Prompt_BadHcalMitig']=1
233 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Prompt']=1
234 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Prompt']=1
235 wmsplit[
'RECODR2_2018reHLT_ZBPrompt']=1
236 wmsplit[
'RECODR2_2018reHLT_Offline']=1
237 wmsplit[
'RECODR2_2018reHLT_skimSingleMu_Offline_Lumi']=1
238 wmsplit[
'RECODR2_2018reHLT_skimDoubleEG_Offline']=1
239 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline']=1
240 wmsplit[
'RECODR2_2018reHLT_skimMET_Offline']=1
241 wmsplit[
'RECODR2_2018reHLT_skimMuOnia_Offline']=1
242 wmsplit[
'RECODR2_2018reHLT_skimEGamma_Offline_L1TEgDQM']=1
243 wmsplit[
'RECODR2_2018reHLT_skimMuonEG_Offline']=1
244 wmsplit[
'RECODR2_2018reHLT_skimCharmonium_Offline']=1
245 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_HEfail']=1
246 wmsplit[
'RECODR2_2018reHLT_skimJetHT_Offline_BadHcalMitig']=1
247 wmsplit[
'RECODR2_2018reHLTAlCaTkCosmics_Offline']=1
248 wmsplit[
'RECODR2_2018reHLT_skimDisplacedJet_Offline']=1
249 wmsplit[
'RECODR2_2018reHLT_ZBOffline']=1
250 wmsplit[
'HLTDR2_50ns']=1
251 wmsplit[
'HLTDR2_25ns']=1
252 wmsplit[
'HLTDR2_2016']=1
253 wmsplit[
'HLTDR2_2017']=1
254 wmsplit[
'HLTDR2_2018']=1
255 wmsplit[
'HLTDR2_2018_BadHcalMitig']=1
256 wmsplit[
'Hadronizer']=1
257 wmsplit[
'DIGIUP15']=1
258 wmsplit[
'RECOUP15']=1
259 wmsplit[
'RECOAODUP15']=5
260 wmsplit[
'DBLMINIAODMCUP15NODQM']=5
261 wmsplit[
'DigiFull']=5
262 wmsplit[
'RecoFull']=5
263 wmsplit[
'DigiFullPU']=1
264 wmsplit[
'RecoFullPU']=1
265 wmsplit[
'RECOHID11']=1
266 wmsplit[
'DigiFullTriggerPU_2026D17PU'] = 1
267 wmsplit[
'RecoFullGlobalPU_2026D17PU']=1
268 wmsplit[
'DIGIUP17']=1
269 wmsplit[
'RECOUP17']=1
270 wmsplit[
'DIGIUP17_PU25']=1
271 wmsplit[
'RECOUP17_PU25']=1
272 wmsplit[
'DIGICOS_UP16']=1
273 wmsplit[
'RECOCOS_UP16']=1
274 wmsplit[
'DIGICOS_UP17']=1
275 wmsplit[
'RECOCOS_UP17']=1
276 wmsplit[
'DIGICOS_UP18']=1
277 wmsplit[
'RECOCOS_UP18']=1
278 wmsplit[
'DIGICOS_UP21']=1
279 wmsplit[
'RECOCOS_UP21']=1
280 wmsplit[
'HYBRIDRepackHI2015VR']=1
281 wmsplit[
'HYBRIDZSHI2015']=1
282 wmsplit[
'RECOHID15']=1
283 wmsplit[
'RECOHID18']=1
284 wmsplit[
'DigiFullTriggerPU_2026D35PU'] = 1
285 wmsplit[
'RecoFullGlobalPU_2026D35PU']=1
286 wmsplit[
'DigiFullTriggerPU_2026D41PU'] = 1
287 wmsplit[
'RecoFullGlobalPU_2026D41PU']=1
288 wmsplit[
'DigiFullTriggerPU_2026D43PU'] = 1
289 wmsplit[
'RecoFullGlobalPU_2026D43PU']=1
290 wmsplit[
'DigiFullTriggerPU_2026D44PU'] = 1
291 wmsplit[
'RecoFullGlobalPU_2026D44PU']=1
292 wmsplit[
'DigiFullTriggerPU_2026D45PU'] = 1
293 wmsplit[
'RecoFullGlobalPU_2026D45PU']=1
294 wmsplit[
'DigiFullTriggerPU_2026D46PU'] = 1
295 wmsplit[
'RecoFullGlobalPU_2026D46PU']=1
296 wmsplit[
'DigiFullTriggerPU_2026D47PU'] = 1
297 wmsplit[
'RecoFullGlobalPU_2026D47PU']=1
298 wmsplit[
'DigiFullTriggerPU_2026D48PU'] = 1
299 wmsplit[
'RecoFullGlobalPU_2026D48PU']=1
300 wmsplit[
'DigiFullTriggerPU_2026D49PU'] = 1
301 wmsplit[
'RecoFullGlobalPU_2026D49PU']=1
302 wmsplit[
'DigiFullTriggerPU_2026D50PU'] = 1
303 wmsplit[
'RecoFullGlobalPU_2026D50PU']=1
304 wmsplit[
'DigiFullTriggerPU_2026D51PU'] = 1
305 wmsplit[
'RecoFullGlobalPU_2026D51PU']=1
306 wmsplit[
'DigiFullTriggerPU_2026D52PU'] = 1
307 wmsplit[
'RecoFullGlobalPU_2026D52PU']=1
308 wmsplit[
'DigiFullTriggerPU_2026D57PU'] = 1
309 wmsplit[
'RecoFullGlobalPU_2026D57PU']=1
310 wmsplit[
'DigiFullTriggerPU_2026D58PU'] = 1
311 wmsplit[
'RecoFullGlobalPU_2026D58PU']=1
316 print(
"Not set up for step splitting")
320 for (n,dir)
in directories.items():
322 print(
"inspecting",dir)
324 for (x,s)
in mReader.workFlowSteps.items():
334 if len( [step
for step
in s[3]
if "HARVESTGEN" in step] )>0:
335 chainDict[
'TimePerEvent']=0.01
336 thisLabel=thisLabel+
"_gen"
338 if len( [step
for step
in s[3]
if "DBLMINIAODMCUP15NODQM" in step] )>0:
339 thisLabel=thisLabel+
"_dblMiniAOD"
345 if 'INPUT' in step
or (
not isinstance(s[2][index],str)):
346 nextHasDSInput=s[2][index]
354 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
356 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
359 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=
'RelVal'+s[1].
split(
'+')[0]
360 if not '--relval' in s[2][index]:
361 print(
'Impossible to create task from scratch without splitting information with --relval')
364 arg=s[2][index].
split()
366 chainDict[
'nowmTasklist'][-1][
'RequestNumEvents'] = ns[0]
367 chainDict[
'nowmTasklist'][-1][
'EventsPerJob'] = ns[1]
368 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] = ns[1]
370 if 'numberEventsInLuminosityBlock' in s[2][index]:
371 nEventsInLuminosityBlock = re.findall(
'process.source.numberEventsInLuminosityBlock=cms.untracked.uint32\(([ 0-9 ]*)\)', s[2][index],re.DOTALL)
372 if nEventsInLuminosityBlock[-1].isdigit()
and int(nEventsInLuminosityBlock[-1]) < ns[1]:
373 chainDict[
'nowmTasklist'][-1][
'EventsPerLumi'] =
int(nEventsInLuminosityBlock[-1])
376 if 'FASTSIM' in s[2][index]
or '--fast' in s[2][index]:
377 thisLabel+=
'_FastSim'
378 if 'lhe' in s[2][index]
in s[2][index]:
379 chainDict[
'nowmTasklist'][-1][
'LheInputFiles'] =
True
384 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
386 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
388 chainDict[
'nowmTasklist'][-1][
'InputDataset']=nextHasDSInput.dataSet
389 if (
'DQMHLTonRAWAOD' in step) :
390 chainDict[
'nowmTasklist'][-1][
'IncludeParents']=
True
391 splitForThisWf=nextHasDSInput.split
392 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
394 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
396 if len(nextHasDSInput.run):
397 chainDict[
'nowmTasklist'][-1][
'RunWhitelist']=nextHasDSInput.run
398 if len(nextHasDSInput.ls):
399 chainDict[
'nowmTasklist'][-1][
'LumiList']=nextHasDSInput.ls
401 if '--data' in s[2][index]
and nextHasDSInput.label:
402 thisLabel+=
'_RelVal_%s'%nextHasDSInput.label
403 if 'filter' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
404 print(
"This has an input DS and a filter sequence: very likely to be the PyQuen sample")
405 processStrPrefix=
'PU_'
406 setPrimaryDs =
'RelVal'+s[1].
split(
'+')[0]
408 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
414 chainDict[
'nowmTasklist'][-1][
'nowmIO']=json.loads(open(
'%s/%s.io'%(dir,step)).
read())
416 print(
"Failed to find",
'%s/%s.io'%(dir,step),
".The workflows were probably not run on cfg not created")
419 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=splitForThisWf
421 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[step]
424 if 'Hadronizer' in step:
425 chainDict[
'nowmTasklist'][-1][
'LumisPerJob']=wmsplit[
'Hadronizer']
428 chainDict[
'nowmTasklist'][-1][
'TaskName']=step
430 chainDict[
'nowmTasklist'][-1][
'PrimaryDataset']=setPrimaryDs
431 chainDict[
'nowmTasklist'][-1][
'ConfigCacheID']=
'%s/%s.py'%(dir,step)
432 chainDict[
'nowmTasklist'][-1][
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
433 chainDict[
'GlobalTag']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
434 if 'NANOEDM' in step :
435 nanoedmGT = chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'GT']
436 if 'NANOMERGE' in step :
437 chainDict[
'GlobalTag'] = nanoedmGT
438 if 'pileup' in chainDict[
'nowmTasklist'][-1][
'nowmIO']:
439 chainDict[
'nowmTasklist'][-1][
'MCPileup']=chainDict[
'nowmTasklist'][-1][
'nowmIO'][
'pileup']
440 if '--pileup ' in s[2][index]:
441 processStrPrefix=
'PU_'
443 processStrPrefix=
'PU25ns_'
445 processStrPrefix=
'PU50ns_'
446 if 'premix_stage2' in s[2][index]
and '--pileup_input' in s[2][index]:
448 processStrPrefix=
'PUpmx25ns_'
449 elif s[2][index].
split()[ s[2][index].
split().
index(
'--pileup_input')+1 ].
find(
'50ns') > 0 :
450 processStrPrefix=
'PUpmx50ns_'
454 chainDict[
'AcquisitionEra'][step]=chainDict[
'CMSSWVersion']
455 chainDict[
'ProcessingString'][step]=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
456 if 'NANOMERGE' in step :
457 chainDict[
'ProcessingString'][step]=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
460 chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']=chainDict[
'CMSSWVersion']
461 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+chainDict[
'nowmTasklist'][-1][
'GlobalTag'].
replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
462 if 'NANOMERGE' in step :
463 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=processStrPrefix+nanoedmGT.replace(
'::All',
'').
replace(
'-',
'_')+thisLabel
466 chainDict[
'nowmTasklist'][-1][
'Campaign'] = chainDict[
'nowmTasklist'][-1][
'AcquisitionEra']+self.
batchName
469 if (
'DBLMINIAODMCUP15NODQM' in step):
470 chainDict[
'nowmTasklist'][-1][
'ProcessingString']=chainDict[
'nowmTasklist'][-1][
'ProcessingString']+
'_miniAOD'
472 if( chainDict[
'nowmTasklist'][-1][
'Multicore'] ):
479 chainDict[
'nowmTasklist'][-1][
'Memory'] = self.
memoryOffset +
int( chainDict[
'nowmTasklist'][-1][
'Multicore'] -1 ) * self.
memPerCore
483 chainDict[
'RequestString']=
'RV'+chainDict[
'CMSSWVersion']+s[1].
split(
'+')[0]
484 if processStrPrefix
or thisLabel:
485 chainDict[
'RequestString']+=
'_'+processStrPrefix+thisLabel
492 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+
'__'+self.
batchTime+
'-'+s[1].
split(
'+')[0]
494 chainDict[
'PrepID'] = chainDict[
'CMSSWVersion']+self.
batchName+
'-'+s[1].
split(
'+')[0]
496 chainDict[
'SubRequestType'] =
"HIRelVal"
503 for i_second
in reversed(
range(len(chainDict[
'nowmTasklist']))):
504 t_second=chainDict[
'nowmTasklist'][i_second]
506 if 'primary' in t_second[
'nowmIO']:
508 primary=t_second[
'nowmIO'][
'primary'][0].
replace(
'file:',
'')
509 for i_input
in reversed(
range(0,i_second)):
510 t_input=chainDict[
'nowmTasklist'][i_input]
511 for (om,o)
in t_input[
'nowmIO'].
items():
515 if (len(t_input[
'TaskName'])>50):
516 if (t_input[
'TaskName'].
find(
'GenSim') != -1):
517 t_input[
'TaskName'] =
'GenSimFull'
518 if (t_input[
'TaskName'].
find(
'Hadronizer') != -1):
519 t_input[
'TaskName'] =
'HadronizerFull'
520 t_second[
'InputTask'] = t_input[
'TaskName']
521 t_second[
'InputFromOutputModule'] = om
523 if t_second[
'TaskName'].startswith(
'HARVEST'):
525 if "_RD" in t_second[
'TaskName']:
526 chainDict[
'DQMHarvestUnit'] =
"multiRun"
527 chainDict[
'DQMConfigCacheID']=t_second[
'ConfigCacheID']
547 chainDict[
'AcquisitionEra'] = chainDict[
'AcquisitionEra'].
values()[0]
548 chainDict[
'ProcessingString'] = chainDict[
'ProcessingString'].
values()[0]
550 chainDict[
'AcquisitionEra'] = chainDict[
'nowmTasklist'][0][
'AcquisitionEra']
551 chainDict[
'ProcessingString'] = chainDict[
'nowmTasklist'][0][
'ProcessingString']
555 chainDict[
'Campaign'] = chainDict[
'AcquisitionEra']+self.
batchName
561 if isinstance(i, int)
and i < len(chainDict[
'nowmTasklist']):
562 chainDict[
'nowmTasklist'][i][
'KeepOutput']=
True
563 for (i,t)
in enumerate(chainDict[
'nowmTasklist']):
564 if t[
'TaskName'].startswith(
'HARVEST'):
568 elif t[
'TaskName']
in self.
keep:
570 if t[
'TaskName'].startswith(
'HYBRIDRepackHI2015VR'):
571 t[
'KeepOutput']=
False
574 chainDict[
'Task%d'%(itask)]=t
581 chainDict[
'TaskChain']=itask
583 chainDict.pop(
'nowmTasklist')
590 labelInCouch=self.
label+
'_'+label
591 cacheName=filePath.split(
'/')[-1]
594 print(
'\tFake upload of',filePath,
'to couch with label',labelInCouch)
598 from modules.wma
import upload_to_couch,DATABASE_NAME
600 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
605 print(
"Not re-uploading",filePath,
"to",where,
"for",label)
608 print(
"Loading",filePath,
"to",where,
"for",label)
610 pool = multiprocessing.Pool(1)
611 cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.
user,self.
group,where)] )
612 cacheId = cacheIds[0]
619 if it.startswith(
"Task")
and it!=
'TaskChain':
621 couchID=self.
uploadConf(d[it][
'ConfigCacheID'],
622 str(n)+d[it][
'TaskName'],
625 print(d[it][
'ConfigCacheID'],
" uploaded to couchDB for",
str(n),
"with ID",couchID)
626 d[it][
'ConfigCacheID']=couchID
627 if it ==
'DQMConfigCacheID':
628 couchID=self.
uploadConf(d[
'DQMConfigCacheID'],
632 print(d[
'DQMConfigCacheID'],
"uploaded to couchDB for",
str(n),
"with ID",couchID)
633 d[
'DQMConfigCacheID']=couchID
638 from modules.wma
import makeRequest,approveRequest
639 from wmcontrol
import random_sleep
640 print(
'\n\tFound wmcontrol\n')
642 print(
'\n\tUnable to find wmcontrol modules. Please include it in your python path\n')
650 print(
"Only viewing request",n)
651 print(pprint.pprint(d))
654 print(
"For eyes before submitting",n)
655 print(pprint.pprint(d))
656 print(
"Submitting",n,
"...........")
657 workFlow=makeRequest(self.
wmagent,d,encodeDict=
True)
658 print(
"...........",n,
"submitted")
661 print(
"\n*** WARNING: "+
str(len(self.
longWFName))+
" workflows have too long names for submission (>"+
str(MAXWORKFLOWLENGTH)+
"characters) ***")