DeadlineCloud / Client / update_job

update_job#

DeadlineCloud.Client.update_job(**kwargs)#

Updates a job.

When you change the status of the job to ARCHIVED, the job can’t be scheduled or archived.

Warning

An archived jobs and its steps and tasks are deleted after 120 days. The job can’t be recovered.

See also: AWS API Documentation

Request Syntax

response = client.update_job(
    clientToken='string',
    targetTaskRunStatus='READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
    priority=123,
    maxFailedTasksCount=123,
    maxRetriesPerTask=123,
    lifecycleStatus='ARCHIVED',
    maxWorkerCount=123,
    farmId='string',
    queueId='string',
    jobId='string'
)
Parameters:
  • clientToken (string) –

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

  • targetTaskRunStatus (string) – The task status to update the job’s tasks to.

  • priority (integer) – The job priority to update.

  • maxFailedTasksCount (integer) – The number of task failures before the job stops running and is marked as FAILED.

  • maxRetriesPerTask (integer) – The maximum number of retries for a job.

  • lifecycleStatus (string) –

    The status of a job in its lifecycle. When you change the status of the job to ARCHIVED, the job can’t be scheduled or archived.

    Warning

    An archived jobs and its steps and tasks are deleted after 120 days. The job can’t be recovered.

  • maxWorkerCount (integer) –

    The maximum number of worker hosts that can concurrently process a job. When the maxWorkerCount is reached, no more workers will be assigned to process the job, even if the fleets assigned to the job’s queue has available workers.

    You can’t set the maxWorkerCount to 0. If you set it to -1, there is no maximum number of workers.

    If you don’t specify the maxWorkerCount, the default is -1.

    The maximum number of workers that can process tasks in the job.

  • farmId (string) –

    [REQUIRED]

    The farm ID of the job to update.

  • queueId (string) –

    [REQUIRED]

    The queue ID of the job to update.

  • jobId (string) –

    [REQUIRED]

    The job ID to update.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • DeadlineCloud.Client.exceptions.AccessDeniedException

  • DeadlineCloud.Client.exceptions.InternalServerErrorException

  • DeadlineCloud.Client.exceptions.ResourceNotFoundException

  • DeadlineCloud.Client.exceptions.ThrottlingException

  • DeadlineCloud.Client.exceptions.ConflictException

  • DeadlineCloud.Client.exceptions.ValidationException