You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: