job.execution.tasks package

Submodules

job.execution.tasks.cleanup_task module

Defines the class for a cleanup task

class job.execution.tasks.cleanup_task.CleanupTask(framework_id, agent_id, job_exes)

Bases: job.tasks.node_task.NodeTask

Represents a task that cleans up after job executions. This class is thread-safe.

get_resources()

See job.tasks.base_task.Task.get_resources()

is_initial_cleanup

Indicates whether this is an initial clean up job (True) or not (False)

Returns:Whether this is an initial clean up job
Return type:bool
job_exes

Returns the list of job executions to clean up

Returns:The list of job executions to clean up
Return type:[job.execution.job_exe.RunningJobExecution]

job.execution.tasks.exe_task module

Defines the abstract base class for all job execution tasks

class job.execution.tasks.exe_task.JobExecutionTask(task_id, agent_id, job_exe, job_type)

Bases: job.tasks.base_task.Task

Abstract base class for a job execution task

determine_error(task_update)

Attempts to determine the error that caused this task to fail

Parameters:task_update (job.tasks.update.TaskStatusUpdate) – The task update
Returns:The error that caused this task to fail, possibly None
Return type:error.models.Error
update_task_id_for_lost_task()

Updates this task’s ID due to the task being lost. A new, unique ID will prevent race conditions where Scale confuses this task with the previous lost task.

job.execution.tasks.main_task module

Defines the class for a job execution job task

class job.execution.tasks.main_task.MainTask(agent_id, job_exe, job_type, configuration)

Bases: job.execution.tasks.exe_task.JobExecutionTask

Represents a job execution main task (runs the actual job/algorithm). This class is thread-safe.

determine_error(task_update)

See job.execution.tasks.exe_task.JobExecutionTask.determine_error()

get_resources()

See job.tasks.base_task.Task.get_resources()

job.execution.tasks.post_task module

Defines the class for a job execution post-task

class job.execution.tasks.post_task.PostTask(agent_id, job_exe, job_type, configuration)

Bases: job.execution.tasks.exe_task.JobExecutionTask

Represents a job execution post-task. This class is thread-safe.

determine_error(task_update)

See job.execution.tasks.exe_task.JobExecutionTask.determine_error()

get_resources()

See job.tasks.base_task.Task.get_resources()

job.execution.tasks.pre_task module

Defines the class for a job execution pre-task

class job.execution.tasks.pre_task.PreTask(agent_id, job_exe, job_type, configuration)

Bases: job.execution.tasks.exe_task.JobExecutionTask

Represents a job execution pre-task. This class is thread-safe.

determine_error(task_update)

See job.execution.tasks.exe_task.JobExecutionTask.determine_error()

get_resources()

See job.tasks.base_task.Task.get_resources()

job.execution.tasks.pull_task module

Defines the class for a job execution pull-task

class job.execution.tasks.pull_task.PullTask(agent_id, job_exe, job_type, configuration)

Bases: job.execution.tasks.exe_task.JobExecutionTask

Represents a job execution pull-task. This class is thread-safe.

determine_error(task_update)

See job.execution.tasks.exe_task.JobExecutionTask.determine_error()

get_resources()

See job.tasks.base_task.Task.get_resources()

Module contents