Skip to content

Commit 4c00627

Browse files
committed
bot: Don't consider previously triggered missing revisions for the count of 7
After c6929c8, the first cron run would trigger 7, any following one would trigger 0.
1 parent 54c0ebf commit 4c00627

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bot/code_coverage_bot/trigger_missing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def trigger_missing(server_address: str, out_dir: str = ".") -> None:
104104

105105
task_group_id = slugId()
106106
logger.info(f"Triggering tasks in the {task_group_id} group")
107+
triggered = 0
107108
for revision, timestamp in reversed(missing_revisions):
108109
# If it's older than yesterday, we assume the group finished.
109110
# If it is newer than yesterday, we load the group and check if all tasks in it finished.
@@ -124,7 +125,8 @@ def trigger_missing(server_address: str, out_dir: str = ".") -> None:
124125

125126
trigger_task(task_group_id, revision)
126127
triggered_revisions.add(revision)
127-
if len(triggered_revisions) == MAXIMUM_TRIGGERS:
128+
triggered += 1
129+
if triggered == MAXIMUM_TRIGGERS:
128130
break
129131

130132
cctx = zstandard.ZstdCompressor(threads=-1)

0 commit comments

Comments
 (0)