Skip to content

PFDL Scheduler API

In this section further information about the functions that can be used from the PFDL Scheduler is given.

pfdl_scheduler.api.service_api.ServiceAPI(service, task_context, uuid='', in_loop=False) dataclass

Represents a called Service. Represents a Service or Service Call in the langauge which can be mapped to a real service that can be executed. Attributes: service: A description of the called Service. task_context: A TaskAPI representaiton of the Task from which the service was called. uuid: A UUID4 which is generated at object creation and is used in the scheduling. in_loop: A boolean indicating whether the Service was called within a loop.

Initialize the object. Args: service: A description of the called Service. task_context: A TaskAPI representaiton of the Task from which the service was called. uuid: A UUID4 which is generated at object creation and is used in the scheduling. in_loop: A boolean indicating whether the Service was called within a loop.

pfdl_scheduler.api.task_api.TaskAPI(task, task_context, uuid='', task_call=None, in_loop=False) dataclass

Represents a called Task.

Represents a specific entity of a called Task. It combines the information of the Task itself and the parameters of the call. A TaskAPI object is used in the task started and finished callback which are called by the scheduler.

Attributes:

Name Type Description
task Task

A description of the called Task.

task_context TaskAPI

A TaskAPI representaiton of the Task from which the called task was invoked.

uuid str

A UUID4 which is generated at object creation and is used in the scheduling.

task_call TaskCall

Information about the input and output parameters of the called Task.

in_loop bool

A boolean indicating whether the Task was called within a loop.

Initialize the object.

Parameters:

Name Type Description Default
task Task

A description of the called Task.

required
task_context TaskAPI

A TaskAPI representaiton of the Task from which the called task was invoked.

required
uuid str

A UUID4 which is generated at object creation and is used in the scheduling.

''
task_call TaskCall

Information about the input and output parameters of the called Task.

None
in_loop bool

A boolean indicating whether the Task was called within a loop.

False