Skip to content
Snippets Groups Projects
Commit caff1a6a authored by Federico Stagni's avatar Federico Stagni
Browse files

rescheduling when LbRunError

parent a8fe96f5
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import os
import shutil
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities import DErrno
from LHCbDIRAC.Core.Utilities.RunApplication import RunApplication, LbRunError, LHCbApplicationError
from LHCbDIRAC.Workflow.Modules.ModuleBase import ModuleBase
......@@ -130,12 +131,12 @@ class ErrorLogging( ModuleBase ):
return S_OK()
except LbRunError as e: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LHCbApplicationError as e: # This is the case for real application errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LbRunError as lbre: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(lbre) )
return S_ERROR( DErrno.EWMSRESC, str(lbre) )
except LHCbApplicationError as lbae: # This is the case for real application errors
self.setApplicationStatus( repr(lbae) )
return S_ERROR( str(lbae) )
except Exception as e: #pylint:disable=broad-except
self.log.exception( "Failure in ErrorLogging execute module", lException = e )
return S_ERROR( "Error in ErrorLogging module" )
......
......@@ -8,7 +8,8 @@ import re
import os
import subprocess
from DIRAC import S_OK, S_ERROR, gLogger, gConfig
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities import DErrno
from LHCbDIRAC.Core.Utilities.ProductionOptions import getDataOptions, getModuleOptions
from LHCbDIRAC.Core.Utilities.RunApplication import RunApplication, LbRunError, LHCbApplicationError
......@@ -183,16 +184,16 @@ class GaudiApplication( ModuleBase ):
return S_OK( "%s %s Successful" % ( self.applicationName, self.applicationVersion ) )
except LbRunError as e: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LHCbApplicationError as e: # This is the case for real application errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except Exception as e: #pylint:disable=broad-except
self.log.exception( "Failure in GaudiApplication execute module", lException = e, lExcInfo = True )
except LbRunError as lbre: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(lbre) )
return S_ERROR( DErrno.EWMSRESC, str(lbre) )
except LHCbApplicationError as lbae: # This is the case for real application errors
self.setApplicationStatus( repr(lbae) )
return S_ERROR( str(lbae) )
except Exception as exc: #pylint:disable=broad-except
self.log.exception( "Failure in GaudiApplication execute module", lException = exc, lExcInfo = True )
self.setApplicationStatus( "Error in GaudiApplication module" )
return S_ERROR( str(e) )
return S_ERROR( str(exc) )
finally:
super( GaudiApplication, self ).finalize( __RCSID__ )
......
......@@ -12,7 +12,9 @@
import re
import os
from DIRAC import S_OK, S_ERROR, gLogger, gConfig
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities import DErrno
from LHCbDIRAC.Core.Utilities.RunApplication import RunApplication, LbRunError, LHCbApplicationError
from LHCbDIRAC.Workflow.Modules.ModuleBase import ModuleBase
......@@ -116,12 +118,12 @@ class GaudiApplicationScript( ModuleBase ):
self.setApplicationStatus( '%s Successful' % os.path.basename( self.script ) )
return S_OK( '%s Successful' % os.path.basename( self.script ) )
except LbRunError as e: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LHCbApplicationError as e: # This is the case for real application errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LbRunError as lbre: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(lbre) )
return S_ERROR( DErrno.EWMSRESC, str(lbre) )
except LHCbApplicationError as lbae: # This is the case for real application errors
self.setApplicationStatus( repr(lbae) )
return S_ERROR( str(lbae) )
except Exception as e: #pylint:disable=broad-except
self.log.exception( "Failure in GaudiApplicationScript execute module", lException = e )
self.setApplicationStatus( "Error in GaudiApplicationScript module" )
......
......@@ -3,6 +3,7 @@
import os
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities import DErrno
from LHCbDIRAC.Core.Utilities.RunApplication import RunApplication, LbRunError, LHCbApplicationError
from LHCbDIRAC.Workflow.Modules.ModuleBase import ModuleBase
......@@ -146,12 +147,12 @@ class RootApplication( ModuleBase ):
self.setApplicationStatus( '%s (Root) Successful' % self.applicationName )
return S_OK()
except LbRunError as e: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LHCbApplicationError as e: # This is the case for real application errors
self.setApplicationStatus( repr(e) )
return S_ERROR( str(e) )
except LbRunError as lbre: # This is the case for lb-run/environment errors
self.setApplicationStatus( repr(lbre) )
return S_ERROR( DErrno.EWMSRESC, str(lbre) )
except LHCbApplicationError as lbae: # This is the case for real application errors
self.setApplicationStatus( repr(lbae) )
return S_ERROR( str(lbae) )
except Exception as e: #pylint:disable=broad-except
self.log.exception( "Failure in RootApplication execute module", lException = e )
return S_ERROR( "Error in RootApplication module" )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment