swh.scheduler.simulator.origin_scheduler module

Agents using the new origin-aware scheduler.

swh.scheduler.simulator.origin_scheduler.scheduler_runner_process(env: swh.scheduler.simulator.common.Environment, task_queues: Dict[str, swh.scheduler.simulator.common.Queue], policy: str, 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.origin_scheduler.scheduler_journal_client_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 journal client. Every once in a while, pulls OriginVisitStatuses from the status_queue to update the scheduler origin_visit_stats table.