job.execution.configuration package

Submodules

job.execution.configuration.configurators module

Defines the classes that handle processing job and execution configuration

class job.execution.configuration.configurators.QueuedExecutionConfigurator(input_files)

Bases: object

Configurator that creates execution configurations when a job execution is queued

configure_queued_job(job)

Creates and returns an execution configuration for the given queued job. The given job model should have its related job_type, job_type_rev, and batch models populated.

Parameters:job (job.models.Job) – The queued job model
Returns:The execution configuration for the queued job
Return type:job.execution.configuration.json.exe_config.ExecutionConfiguration
class job.execution.configuration.configurators.ScheduledExecutionConfigurator(workspaces)

Bases: object

Configurator that handles execution configurations when a job execution is scheduled

configure_scheduled_job(job_exe, job_type, interface, system_logging_level)

Configures the JSON configuration field for the given scheduled job execution. The given job_exe and job_type models will not have any related fields populated. The execution configuration in the job_exe model will have all secret values replaced with ‘*‘ so that it is safe to be stored in the database. Another copy of this configuration will be returned that has the actual secret values populated and can be used for actual scheduling.

Parameters:
Returns:

A copy of the configuration containing secret values

Return type:

job.execution.configuration.json.exe_config.ExecutionConfiguration

job.execution.configuration.docker_param module

Defines a Docker parameter that is set for a task

class job.execution.configuration.docker_param.DockerParameter(flag, value)

Bases: object

Represents a Docker parameter set for a task

job.execution.configuration.exceptions module

Defines exceptions that can occur when interacting with job executions

exception job.execution.configuration.exceptions.InvalidExecutionConfiguration

Bases: exceptions.Exception

Exception indicating that the provided execution configuration JSON was invalid

exception job.execution.configuration.exceptions.MissingMount(name)

Bases: error.exceptions.ScaleError

Error class indicating that a required mount volume is missing

get_log_message()

See error.exceptions.ScaleError.get_log_message()

exception job.execution.configuration.exceptions.MissingSetting(setting)

Bases: error.exceptions.ScaleError

Error class indicating that a required setting value is missing

get_log_message()

See error.exceptions.ScaleError.get_log_message()

job.execution.configuration.input_file module

Defines an input file and its meta-data in an execution configuration

class job.execution.configuration.input_file.InputFile(scale_file)

Bases: object

Defines an input file and its meta-data

job.execution.configuration.volume module

Defines a Docker volume that will be mounted into a container

class job.execution.configuration.volume.Volume(name, container_path, mode, is_host=True, host_path=None, driver=None, driver_opts=None)

Bases: object

Defines a Docker volume that will be mounted into a container

to_docker_param(is_created)

Returns a Docker parameter that will perform the mount of this volume

Parameters:is_created (bool) – Whether this volume has already been created
Returns:The Docker parameter that will mount this volume
Return type:job.execution.configuration.docker_param.DockerParameter

job.execution.configuration.workspace module

Defines a workspace that is needed by a task

class job.execution.configuration.workspace.TaskWorkspace(name, mode, volume_name=None)

Bases: object

Represents a workspace needed by a task

Module contents