scheduler.tasks.services package¶
Subpackages¶
Submodules¶
scheduler.tasks.services.service module¶
Defines the abstract base class for all system services
-
class
scheduler.tasks.services.service.
Service
¶ Bases:
object
Abstract base class for a system service
-
generate_status_json
()¶ Generates the portion of the status JSON that describes this service
Returns: The dict containing the status for this service Return type: dict
-
get_actual_task_count
()¶ Returns the actual number of tasks currently running for this service
Returns: The actual number of tasks Return type: int
-
get_desired_task_count
()¶ Returns the number of tasks that are desired for this service
Returns: The desired number of tasks Return type: int
-
get_tasks_to_kill
()¶ Returns a list of service tasks that need to be killed
Returns: The list of service tasks to kill Return type: list()
-
get_tasks_to_schedule
()¶ Returns a list of service tasks that need to be scheduled
Returns: The list of service tasks to schedule Return type: list()
-
handle_task_update
(task_update)¶ Handles the given service task update
Parameters: task_update ( job.tasks.update.TaskStatusUpdate
) – The task update
-