swh.scheduler.simulator.task_scheduler module

Agents using the “old” task-based scheduler.

swh.scheduler.simulator.task_scheduler.scheduler_runner_process(env: swh.scheduler.simulator.common.Environment, task_queues: Dict[str, swh.scheduler.simulator.common.Queue], min_batch_size: int) Iterator[simpy.events.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: swh.scheduler.simulator.common.Environment, status_queue: swh.scheduler.simulator.common.Queue) Generator[simpy.events.Event, swh.scheduler.simulator.common.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.