Skip to content

Conversation

@nadavtzaysler
Copy link

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:

else:
self._heartbeat_failures += 1
# Stop after 3 consecutive failures
if self._heartbeat_failures >= 3:

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:

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Send query heartbeat while downloading results

2 participants