Utils
Utilities for WMS
- DIRAC.WorkloadManagementSystem.Utilities.Utils.createJobWrapper(jobID: str, jobParams: dict, resourceParams: dict, optimizerParams: dict, payloadParams: dict | None = None, extraOptions: str | None = None, wrapperPath: str | None = None, rootLocation: str | None = None, pythonPath: str | None = None, defaultWrapperLocation: str | None = 'DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapperTemplate.py', log: ~DIRAC.FrameworkSystem.private.standardLogging.Logging.Logging | None = <DIRAC.FrameworkSystem.private.standardLogging.LoggingRoot.LoggingRoot object>, logLevel: str | None = 'INFO', cfgPath: str | None = None)
This method creates a job wrapper filled with the CE and Job parameters to execute the job. Main user is the JobAgent.
- Parameters:
jobID – Job ID
jobParams – Job parameters
resourceParams – CE parameters
optimizerParams – Optimizer parameters
payloadParams – Payload parameters
extraOptions – Extra options to be passed to the job wrapper
wrapperPath – Path where the job wrapper will be created
rootLocation – Location where the job wrapper will be executed
pythonPath – Path to the python executable
defaultWrapperLocation – Location of the default job wrapper template
log – Logger
logLevel – Log level
cfgPath – Path to a specific configuration file
- Returns:
S_OK with the path to the job wrapper and the path to the job wrapper json file