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

Adding methods for getting redash job id for the query and for tracking redash job status by its id #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arrnorets
Copy link

Proposed pull request contains a method track_job_status_by_id that allows Redash to complete a query until a valid final status: 3 - SUCCESS, 4 - FAILURE or 5 - CANCELLED ( see https://redash.io/help/user-guide/integrations-and-api/api/ ), instead of setting a timeout. It helps to avoid a case when query timeout specified by the method query_and_wait_result is ( much ) shorter than a timeout for interaction between Redash and selected data source, so the method would return a timeout error before Redash completes query execution.

Usage example:

...
jobid = redash.query_and_return_jobid(datasourceID, statement)
result = redash.track_job_status_by_id(jobid)
...

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

Successfully merging this pull request may close these issues.

None yet

1 participant