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

Auto-triggering: don't retrigger if there are recently (<12 h) failed requests #288

Merged
merged 5 commits into from
Apr 9, 2024

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Apr 8, 2024

We noticed that when SEDM marked a request as failed (which happens every now and then), BTSbot would retrigger, and that could happen multiple times.

Here we make sure to keep recently (less than 12 hours) failed requests as "existing requests", to avoid triggering again. It's essentially a 12-hour timeout, which means we don't re-trigger until the next time (that is, if the requests is still failed, but most of the time these are re-processed manually in the daytime).

@Theodlz Theodlz self-assigned this Apr 8, 2024
@Theodlz Theodlz added the enhancement New feature or request label Apr 8, 2024
@Theodlz Theodlz requested a review from mcoughlin April 8, 2024 19:45
@Theodlz
Copy link
Collaborator Author

Theodlz commented Apr 8, 2024

@nabeelre should be as simple as this. Let's run it with 12 hours to not add extra complexity with moving arguments around, and if we're happy with the behavior but we need another timeout value, we'll make it dynamic.

Copy link
Collaborator

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

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

LGTM

kowalski/alert_brokers/alert_broker.py Outdated Show resolved Hide resolved
kowalski/alert_brokers/alert_broker.py Outdated Show resolved Hide resolved
@Theodlz Theodlz merged commit efdf8b5 into skyportal:main Apr 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants