Skip to content

Commit

Permalink
Wait for schedules to be cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Sep 9, 2024
1 parent 713a0c1 commit e3da154
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions oonipipeline/tests/test_temporal_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ async def test_scheduling(datadir, db):
assert sched_res.analysis
assert sched_res.observations

await clear_schedules(
client=env.client,
probe_cc=[],
test_name=[],
)
scheduled_ids = [sched_res.analysis, sched_res.observations]
while len(scheduled_ids) > 0:
cleared_schedule_ids = await clear_schedules(
client=env.client,
probe_cc=[],
test_name=[],
)
scheduled_ids = [
sid for sid in scheduled_ids if sid not in cleared_schedule_ids
]
await asyncio.sleep(1)

while True:
await asyncio.sleep(1)
Expand Down

0 comments on commit e3da154

Please sign in to comment.