genvid.toolbox.JobsAPI¶
-
class
genvid.toolbox.
JobsAPI
(parent_api: genvid.toolbox.httpapi.BaseHttpApiTool, **kwargs)¶ Bases:
genvid.toolbox.httpapi.BaseHttpApiTool
The jobs api. See Bastion API and Cluster API
New in version 1.12.0.
-
NAME
= 'logs-api'¶
-
get_base_url
(timeout=0.0) → str¶ Get the base URL.
-
get_job_definitions
(timeout=0.0) → dict¶ Get the list of all job definitions.
Parameters: timeout – The timeout in seconds. New in version 1.12.0.
-
update_job_definitions
(jobs: dict, timeout=0.0) → dict¶ Create or update the job’s definitions.
Parameters: - jobs – The job definition.
- timeout – The timeout in seconds.
New in version 1.12.0.
-
get_job_definition
(job_id: str, timeout=0.0) → dict¶ Get a job definitions.
Parameters: - job_id – The job ID.
- timeout – The timeout in seconds.
New in version 1.12.0.
-
add_job_definition
(job_id: str, job: dict, timeout=0.0) → dict¶ Create a job definitions.
Parameters: - job_id – The job ID.
- job – The job definition.
- timeout – The timeout in seconds.
New in version 1.12.0.
-
update_job_definition
(job_id: str, job: dict, timeout=0.0) → dict¶ Update a job definitions.
Parameters: - job_id – The job ID.
- job – The job definition.
- timeout – The timeout in seconds.
New in version 1.12.0.
-
delete_job_definitions
(timeout=0.0) → dict¶ Delete all job definitions.
Parameters: timeout – The timeout in seconds. New in version 1.12.0.
-
delete_job_definition
(job_id: str, timeout=0.0) → dict¶ Delete a job definitions.
Parameters: - job_id – The job ID.
- timeout – The timeout in seconds.
New in version 1.12.0.
-
get_jobs_summary
(timeout=0.0) → typing.List[dict]¶ Get the jobs summary for all jobs.
Parameters: timeout – The timeout in seconds.
-
get_job_summary
(job_id: str, timeout=0.0) → typing.List[dict]¶ Get a job summary
Parameters: - job_id – The job ID.
- timeout – The timeout in seconds.
-
start_job
(job_id: str, timeout=0.0) → typing.List[dict]¶ Start a job
Parameters: - job_id – The job ID.
- timeout – The timeout in seconds.
-
stop_job
(job_id: str, timeout=0.0) → typing.List[dict]¶ Stop a job
Parameters: - job_id – The job ID.
- timeout – The timeout in seconds.
-
start_all_job
(timeout=0.0) → typing.List[dict]¶ Start all jobs
Parameters: timeout – The timeout in seconds.
-
stop_all_job
(timeout=0.0) → typing.List[dict]¶ Stop all jobs
Parameters: timeout – The timeout in seconds.
-
update_job_count
(job_id: str, task_group: str, count: int, timeout=0.0) → typing.List[dict]¶ Update job’s task group count by an increment or decrement
Parameters: - job_id – The job ID
- task_group – The task group.
- count – The task group count delta. 0 to stop the job.
- timeout – The timeout in seconds.
-
get_taskgroup_count
(job_id: str, task_group: str, timeout=0.0) → int¶ Get the job’s task group count
Parameters: - job_id – The job ID
- task_group – The task group.
- timeout – The timeout in seconds.
New in version 1.23.0.
-
set_taskgroup_count
(job_id: str, task_group: str, count: int, timeout=0.0) → typing.List[dict]¶ Set the job’s task group count
Parameters: - job_id – The job ID
- task_group – The task group.
- count – The task group count delta. 0 to stop the job.
- timeout – The timeout in seconds.
New in version 1.23.0.
-
-
class
api_jobs.
JobsAPI
¶ Implementation of
genvid.toolbox.JobsAPI