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

Add periodic task to clear schedule of queries whose schedule until value is in the past #3375

Closed
arikfr opened this issue Jan 31, 2019 · 2 comments

Comments

@arikfr
Copy link
Member

arikfr commented Jan 31, 2019

We now have an optional expiry date for the query schedule. We should add a periodic Celery task to clear the schedule on such queries.

@aidarbek
Copy link
Member

Does it really have to be a separate task? I just saw this line

if schedule_until <= now:

Which is executed when refresh_queries celery task is running. Maybe adding schedule clearing inside of this if statement could solve this issue?

@arikfr
Copy link
Member Author

arikfr commented May 12, 2019

That's an option too. I wouldn't do the update in-place though, but rather return the list of queries to remove scheduling of from outdated_queries call, and then do the schedule removal after doing the queries refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants