Skip to content

Job Manager Subsystem for Python

Subsystem Methods

NameDescription
get_num_jobsGet the total number of jobs in the queue.
cancel_jobCancels the job with the given ID. If the job has already started it may or may not listen to the request.
cancel_all_jobsCancels all the jobs in the queue. If any job has already started it may or may not listen to the request.
is_pending_jobs_pausedChecks if the job manager has been asked to pause.
pause_pending_jobsPause pending jobs. No new jobs will be started, but those already running will continue on. Call ResumePendingJobs() to be able to run the jobs again.
resume_pending_jobsResume running pending jobs. Called after PausePendingJobs() have been called and when the jobs can be started again.
wait_for_job_to_completeWaits for the job with the given ID to complete.
wait_for_all_jobs_to_completeWaits for all the jobs in the job queue to complete.

Subsystem Properties

NameDescription
on_job_addedCalled when a new job has been added.
on_job_completedCalled when a job has completed.
on_job_progress_updatedCalled when a job's progress is updated.
on_job_state_changedCalled when a job's state changes.

Data structs

NameDescription
JobInfoRepresents a snapshot of a job's state and related information.

Enums

NameDescription
JobStateThis enum specifies what state the job has.

Functions details

get_num_jobs

Get the total number of jobs in the queue.

cancel_job

Cancels the job with the given ID. If the job has already started it may or may not listen to the request.

cancel_all_jobs

Cancels all the jobs in the queue. If any job has already started it may or may not listen to the request.

is_pending_jobs_paused

Checks if the job manager has been asked to pause.

pause_pending_jobs

Pause pending jobs. No new jobs will be started, but those already running will continue on. Call ResumePendingJobs() to be able to run the jobs again.

resume_pending_jobs

Resume running pending jobs. Called after PausePendingJobs() have been called and when the jobs can be started again.

wait_for_job_to_complete

Waits for the job with the given ID to complete.

wait_for_all_jobs_to_complete

Waits for all the jobs in the job queue to complete.

Properties details

on_job_added

Called when a new job has been added.

on_job_completed

Called when a job has completed.

on_job_progress_updated

Called when a job's progress is updated.

on_job_state_changed

Called when a job's state changes.

Data structs details

JobInfo

Represents a snapshot of a job's state and related information.

Enums details

JobState

This enum specifies what state the job has.