Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: limit the delay between tasks to 60s #98

Merged
merged 1 commit into from
Oct 21, 2024
Merged

fix: limit the delay between tasks to 60s #98

merged 1 commit into from
Oct 21, 2024

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Oct 18, 2024

Ensure the checker prints some message at least once per minute, to prevent Station Core for considering it as stuck.

As a side effect, this also fixes the problem when maxTasksPerRound is zero, the delay is calculated as Infinity and we call setTimeout(Infinity). Such call is a no-op in Deno, which causes the checker to loop very quickly and pollute the logs with too many "Completed all tasks for the current round." messages.

After this change, the message is print once per minute.

Links:

Ensure the checker prints some message at least once per minute,
to prevent Station Core for considering it as stuck.

As a side effect, this also fixes the problem when maxTasksPerRound
is zero, the delay is calculated as Infinity and we call
`setTimeout(Infinity)`. Such call is a no-op in Deno, which causes
the checker to loop very quickly and pollute the logs with too many
"Completed all tasks for the current round." messages.

After this change, the message is print once per minute.

Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos bajtos requested a review from juliangruber October 18, 2024 12:58
Copy link
Member

@juliangruber juliangruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@bajtos bajtos merged commit b9948e0 into main Oct 21, 2024
2 checks passed
@bajtos bajtos deleted the bounded-delay branch October 21, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ done
Development

Successfully merging this pull request may close these issues.

2 participants