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 Time Limit to Scheduled Queries #3700

Closed
arikfr opened this issue Apr 11, 2019 · 1 comment
Closed

Add Time Limit to Scheduled Queries #3700

arikfr opened this issue Apr 11, 2019 · 1 comment
Assignees
Labels

Comments

@arikfr
Copy link
Member

arikfr commented Apr 11, 2019

We already have a global time limit for adhoc queries (disabled by default). Now we want to have another time limit for scheduled queries, while also properly communicating the user what happened (rather than showing the raw exception message).

There are two things to implement here:

1.
Convert the TimeLimit exceptions (there are two: hard and soft, although I think we only use soft) into user friendly messages. Basically catch the exception and raise a new one with a friendly message.

2.
Adding a TimeLimit to scheduled queries. But here’s the tricky part: it needs to be variable based on the org’s plan. Alas there is no plan concept in the OSS Redash. To this end I thought of having Policy object, similar to the one we have in the frontend code. Right now it will have a single method to decide on the time limit, but later we can add more methods to it. This method will take a user object and whether it's scheduled as parameters and return the time limit value.

The default implementation will just read from configuration. But we need a way to extend/replace implementation in the SaaS codebase. One thought I had for this is to have the name of the object defined in redash.settings and dynamically loaded during startup. But open to other ideas as well.

@rauchy
Copy link
Contributor

rauchy commented Apr 11, 2019

Seems like (1) is already implemented :)

image

@rauchy rauchy mentioned this issue Apr 11, 2019
6 tasks
@rauchy rauchy closed this as completed Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants