-
Notifications
You must be signed in to change notification settings - Fork 200
added heartbeat interval to check if query is still fetching data #588
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
base: master
Are you sure you want to change the base?
added heartbeat interval to check if query is still fetching data #588
Conversation
| else: | ||
| self._heartbeat_failures += 1 | ||
| # Stop after 3 consecutive failures | ||
| if self._heartbeat_failures >= 3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You drop heartbeat silently after 3 failures. User has no idea.
Perhaps log a warning?
| break | ||
|
|
||
| # Reset failure count on success | ||
| if status_code == 200: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why only 200 and not all 200<=x<300 values?
|
|
||
| ## Progress Callback | ||
|
|
||
| The Trino client supports progress callbacks to track query execution progress in real-time. you can provide a callback function that gets called whenever the query status is updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Trino client supports progress callbacks to track query execution progress in real-time. you can provide a callback function that gets called whenever the query status is updated. | |
| The Trino client supports progress callbacks to track query execution progress in real-time. You can provide a callback that is called whenever the query status is updated. |
| self._result = TrinoResult(self, rows) | ||
|
|
||
| # Start heartbeat if interval is set and next_uri is available | ||
| if self._heartbeat_interval_seconds is not None and self._next_uri is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if self._heartbeat_interval_seconds is not None and self._next_uri is not None: | |
| if self._heartbeat_interval_seconds and self._next_uri: |
isnt this the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
below as well
Description
fixed #554
made the python client send heartbeats to the server at fixed configured intervals
Non-technical explanation
queries will now be able to continue fetching data after 15 min
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(X ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: