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

Mandatory expiry of scheduled queries #982

Open
emtwo opened this issue Aug 9, 2019 · 2 comments
Open

Mandatory expiry of scheduled queries #982

emtwo opened this issue Aug 9, 2019 · 2 comments

Comments

@emtwo
Copy link

emtwo commented Aug 9, 2019

As suggested in #949, scheduled queries are often forgotten so it might be helpful to automatically expire them after some time unless they are renewed.

@jezdez
Copy link

jezdez commented Aug 9, 2019

FWIW we already can set up periodic Celery tasks via redash-stmo and the extension mechanism.

So I suggest to have two things:

Add a task to go through all scheduled queries (maybe in a staggered way) and look how long they've been running. When they reach a schedule timeout (e.g. after 30 days for daily queries, after 2 months for bi-weekly queries, quarterly for monthly jobs, yearly for yearly queries) we reset the scheduling.

And then send out notifications to their owners asking to either confirm the scheduling by clicking a link in the email that would reinstate the schedule or doing nothing.

In the extension we can add new API endpoints, and even static Flask views that render an output when the users have clicked on the link.

@wlach
Copy link

wlach commented Aug 9, 2019

It would be nice if there were some integration between the expiry notifications and the "ends on" field described here:

#949 (comment)

Having two seperate expiry policies (one displayed in the UI, the other only enforced via a celery task) might be a bit confusing to people. If it were up to me, I'd probably modify the UI above to insist that queries expire after a maximum period of time. A celery task could then warn the user when that date is close to arriving.

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

No branches or pull requests

3 participants