Skip to content

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

Open
arrnorets wants to merge 1 commit intodamienzeng73:masterfrom
arrnorets:patch-add_track_job_status_by_id-1
Open

Adding methods for getting redash job id for the query and for tracking redash job status by its id#22
arrnorets wants to merge 1 commit intodamienzeng73:masterfrom
arrnorets:patch-add_track_job_status_by_id-1

Conversation

@arrnorets
Copy link
Copy Markdown

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.

1 participant