Skip to content

Commit d5e9098

Browse files
committed
fix step duration
1 parent de7c73c commit d5e9098

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/worker/jobs/step_run_mock_job.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def __init__(self, run_id, realtime, timescale, external_clock, start_datetime,
1515
StepRunBase.__init__(self, run_id, realtime, timescale, external_clock, start_datetime, end_datetime, skip_site_init=True, skip_stop_db_writes=True)
1616
self.options.warmup_is_first_step = True
1717
self.options.timestep_duration = timedelta(minutes=1)
18+
self.simulation_step_duration = 1
1819
self.run.sim_time = self.options.start_datetime
1920

2021
def get_sim_time(self) -> datetime.datetime:
@@ -25,9 +26,9 @@ def initialize_simulation(self):
2526

2627
@message
2728
def set_simulation_step_duration(self, simulation_step_duration):
28-
self.options.timestep_duration = timedelta(minutes=simulation_step_duration)
29+
self.simulation_step_duration = simulation_step_duration
2930

3031
@message
3132
def advance(self):
32-
sleep(self.options.timestep_duration)
33+
sleep(self.simulation_step_duration)
3334
self.run.sim_time = self.run.sim_time + self.options.timestep_duration

0 commit comments

Comments
 (0)