@@ -177,21 +177,21 @@ async def test_schedule_all_pipelines(
177177 assert comp_run .cluster_id == DEFAULT_CLUSTER_ID
178178 assert comp_run .metadata == run_metadata
179179 assert comp_run .result is RunningState .PUBLISHED
180- assert comp_run .last_scheduled is not None
181- start_schedule_time = comp_run .last_scheduled
180+ assert comp_run .scheduled is not None
181+ start_schedule_time = comp_run .scheduled
182182 start_modified_time = comp_run .modified
183183
184184 # this will now not schedule the pipeline since it was already scheduled
185185 await schedule_all_pipelines (initialized_app )
186186 scheduler_rabbit_client_parser .assert_not_called ()
187187 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
188188 comp_run = comp_runs [0 ]
189- assert comp_run .last_scheduled == start_schedule_time , "scheduled time changed!"
189+ assert comp_run .scheduled == start_schedule_time , "scheduled time changed!"
190190 assert comp_run .cancelled is None
191191 assert comp_run .modified == start_modified_time
192192
193193 # once the worker is done, the schedule time is set back to None
194- await CompRunsRepository (aiopg_engine ).mark_as_scheduled_done (
194+ await CompRunsRepository (aiopg_engine ).mark_scheduling_done (
195195 user_id = comp_run .user_id ,
196196 project_id = comp_run .project_uuid ,
197197 iteration = comp_run .iteration ,
@@ -210,9 +210,9 @@ async def test_schedule_all_pipelines(
210210 scheduler_rabbit_client_parser .reset_mock ()
211211 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
212212 comp_run = comp_runs [0 ]
213- assert comp_run .last_scheduled is not None
214- assert comp_run .last_scheduled > start_schedule_time
215- last_schedule_time = comp_run .last_scheduled
213+ assert comp_run .scheduled is not None
214+ assert comp_run .scheduled > start_schedule_time
215+ last_schedule_time = comp_run .scheduled
216216 assert comp_run .cancelled is None
217217 assert comp_run .modified > start_modified_time
218218
@@ -233,8 +233,8 @@ async def test_schedule_all_pipelines(
233233 scheduler_rabbit_client_parser .reset_mock ()
234234 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
235235 comp_run = comp_runs [0 ]
236- assert comp_run .last_scheduled is not None
237- assert comp_run .last_scheduled > last_schedule_time
236+ assert comp_run .scheduled is not None
237+ assert comp_run .scheduled > last_schedule_time
238238 assert comp_run .cancelled is not None
239239
240240
@@ -277,16 +277,16 @@ async def test_schedule_all_pipelines_logs_error_if_it_find_old_pipelines(
277277 assert comp_run .cluster_id == DEFAULT_CLUSTER_ID
278278 assert comp_run .metadata == run_metadata
279279 assert comp_run .result is RunningState .PUBLISHED
280- assert comp_run .last_scheduled is not None
281- start_schedule_time = comp_run .last_scheduled
280+ assert comp_run .scheduled is not None
281+ start_schedule_time = comp_run .scheduled
282282 start_modified_time = comp_run .modified
283283
284284 # this will now not schedule the pipeline since it was already scheduled
285285 await schedule_all_pipelines (initialized_app )
286286 scheduler_rabbit_client_parser .assert_not_called ()
287287 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
288288 comp_run = comp_runs [0 ]
289- assert comp_run .last_scheduled == start_schedule_time , "scheduled time changed!"
289+ assert comp_run .scheduled == start_schedule_time , "scheduled time changed!"
290290 assert comp_run .cancelled is None
291291 assert comp_run .modified == start_modified_time
292292
@@ -295,7 +295,7 @@ async def test_schedule_all_pipelines_logs_error_if_it_find_old_pipelines(
295295 comp_run .user_id ,
296296 comp_run .project_uuid ,
297297 comp_run .iteration ,
298- last_scheduled = datetime .datetime .now (tz = datetime .UTC )
298+ scheduled = datetime .datetime .now (tz = datetime .UTC )
299299 - SCHEDULER_INTERVAL * (_LOST_TASKS_FACTOR + 1 ),
300300 )
301301 with caplog .at_level (logging .ERROR ):
@@ -313,8 +313,8 @@ async def test_schedule_all_pipelines_logs_error_if_it_find_old_pipelines(
313313 scheduler_rabbit_client_parser .reset_mock ()
314314 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
315315 comp_run = comp_runs [0 ]
316- assert comp_run .last_scheduled is not None
317- assert comp_run .last_scheduled > start_schedule_time
316+ assert comp_run .scheduled is not None
317+ assert comp_run .scheduled > start_schedule_time
318318 assert comp_run .cancelled is None
319319 assert comp_run .modified > start_modified_time
320320
0 commit comments