Skip to content

Commit

Permalink
add sleep to allow mock step run to fall behind
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Jan 8, 2025
1 parent d0bc4d2 commit de7c73c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/worker/jobs/step_run_mock_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ def __init__(self, run_id, realtime, timescale, external_clock, start_datetime,
self.options.timestep_duration = timedelta(minutes=1)
self.run.sim_time = self.options.start_datetime

def step(self):
sleep(self.simulation_step_duration)
self.set_run_time(self.run.sim_time + self.time_per_step())

def get_sim_time(self) -> datetime.datetime:
return self.run.sim_time

Expand All @@ -33,4 +29,5 @@ def set_simulation_step_duration(self, simulation_step_duration):

@message
def advance(self):
sleep(self.options.timestep_duration)
self.run.sim_time = self.run.sim_time + self.options.timestep_duration

0 comments on commit de7c73c

Please sign in to comment.