CMS 3D CMS Logo

Classes | Functions
crabFunctions Namespace Reference

This module provides common functions for tasks with crab3. More...

Classes

class  CertInfo
 
class  CrabController
 The CrabController class. More...
 
class  CrabTask
 Class for a single CrabRequest e This class represents one crab3 task/request. More...
 
class  TaskStats
 Class holds job statistics for several Crab tasks. More...
 

Functions

def crabCommandProcess (q, crabCommandArgs)
 Function to run crab command in a new process. More...
 

Detailed Description

This module provides common functions for tasks with crab3.

This module provides common functions for tasks with crab3. You need no create a CrabController object in order to use the functions

Function Documentation

def crabFunctions.crabCommandProcess (   q,
  crabCommandArgs 
)

Function to run crab command in a new process.

Some CRAB commands (e.g. submit) create broken cmssw process objects when they are created in multiple calls of crabCommand via CRAB API Running them in a new process is a workaround, see https://twiki.cern.ch/twiki/bin/view/CMSPublic/CRAB3FAQ#Multiple_submission_fails_with_a

Definition at line 315 of file crabFunctions.py.

315 def crabCommandProcess(q,crabCommandArgs):
316  # give crab3 the chance for one server glitch
317  i=0
318  while True:
319  i+=1
320  try:
321  res = crabCommand(*crabCommandArgs)
322  break
323  except HTTPException as e:
324  print "crab error ---------------"
325  print e
326  print "end error ---------------"
327  print "will try again!"
328  import time
329  time.sleep(5)
330  except CachefileNotFoundException as e:
331  print "crab error ---------------"
332  print e
333  print "end error ---------------"
334  print crabCommandArgs
335  res={ 'status':"CachefileNotFound",'jobs':{}}
336  break
337  if i>5:
338  res={ 'status':"UnexpectedError",'jobs':{}}
339  break
340  q.put( res )
341 
def crabCommandProcess(q, crabCommandArgs)
Function to run crab command in a new process.