diff --git a/swh/scheduler/simulator/__init__.py b/swh/scheduler/simulator/__init__.py --- a/swh/scheduler/simulator/__init__.py +++ b/swh/scheduler/simulator/__init__.py @@ -54,6 +54,12 @@ yield env.process(load_task_process(env, task, status_queue=status_queue)) +def heartbeat(env: Environment) -> Generator[Event, None, None]: + while True: + logger.info("Simulation time: %s", env.time) + yield env.timeout(3600 * 24) + + def setup( env: Environment, scheduler_type: str, @@ -103,6 +109,7 @@ lister = env.scheduler.get_or_create_lister(name="example") assert lister.id env.process(lister_process(env, lister.id)) + env.process(heartbeat(env)) def fill_test_data(scheduler: SchedulerInterface, num_origins: int = 100000):