scheduler.task package¶
Submodules¶
scheduler.task.manager module¶
Defines the class that manages pushing task status updates to the database
-
class
scheduler.task.manager.
TaskUpdateManager
¶ Bases:
object
This class pushes task status updates to the database. This class is thread-safe.
-
COUNT_WARNING_THRESHOLD
= 1000¶
-
MAX_BATCH_SIZE
= 500¶
-
add_task_update
(task_update)¶ Adds the given task update to the manager so it can be pushed to the database
Parameters: task_update ( job.models.TaskUpdate
) – The task update model to add
-
push_to_database
()¶ Pushes the recent status updates to the database
Returns: The total number of status updates pushed Return type: int
-