swh.scheduler.simulator.task_scheduler module
Agents using the “old” task-based scheduler.
-
swh.scheduler.simulator.task_scheduler.scheduler_runner_process(env: Environment, task_queues: Dict[str, Queue], min_batch_size: int) → Iterator[Event][source]
Scheduler runner. Grabs next visits from the database according to the
scheduling policy, and fills the task_queues accordingly.
-
swh.scheduler.simulator.task_scheduler.scheduler_listener_process(env: Environment, status_queue: Queue) → Generator[Event, TaskEvent, None][source]
Scheduler listener. In the real world this would listen to celery
events, but we listen to the status_queue and simulate celery events from
that.