WorkflowTasks

class DIRAC.TransformationSystem.Client.WorkflowTasks.WorkflowTasks(transClient=None, logger=None, submissionClient=None, jobMonitoringClient=None, outputDataModule=None, jobClass=None, opsH=None, destinationPlugin=None, ownerDN=None, ownerGroup=None)

Bases: TaskBase

Handles jobs

__init__(transClient=None, logger=None, submissionClient=None, jobMonitoringClient=None, outputDataModule=None, jobClass=None, opsH=None, destinationPlugin=None, ownerDN=None, ownerGroup=None)

Generates some default objects. jobClass is by default “DIRAC.Interfaces.API.Job.Job”. An extension of it also works: VOs can pass in their job class extension, if present

getOutputData(paramDict)

Get the list of job output LFNs from the provided plugin

getSubmittedFileStatus(fileDicts)

Check the status of a list of files and return the new status of each LFN

getSubmittedTaskStatus(taskDicts)

Check the status of a list of tasks and return lists of taskIDs for each new status

prepareTransformationTasks(transBody, taskDict, owner='', ownerGroup='', ownerDN='', bulkSubmissionFlag=False)
Prepare tasks, given a taskDict, that is created (with some manipulation) by the DB

jobClass is by default “DIRAC.Interfaces.API.Job.Job”. An extension of it also works.

Parameters:
  • transBody (str) – transformation job template

  • taskDict (dict) – dictionary of per task parameters

  • owner (str) – owner of the transformation

  • ownerGroup (str) – group of the owner of the transformation

  • ownerDN (str) – DN of the owner of the transformation

  • bulkSubmissionFlag (bool) – flag for using bulk submission or not

Returns:

S_OK/S_ERROR with updated taskDict

submitTaskToExternal(job)

Submits a single job (which can be a bulk one) to the WMS.

submitTasksToExternal(_task)

To make sure the method is implemented in the derived class

submitTransformationTasks(taskDict)

Submit the tasks

updateDBAfterTaskSubmission(taskDict)

Sets tasks status after the submission to “Submitted”, in case of success

updateTransformationReservedTasks(taskDicts)

To make sure the method is implemented in the derived class