added healthcheck to the trino python client making it able to procce…#575
Closed
nadavtzaysler wants to merge 7 commits intotrinodb:masterfrom
Closed
added healthcheck to the trino python client making it able to procce…#575nadavtzaysler wants to merge 7 commits intotrinodb:masterfrom
nadavtzaysler wants to merge 7 commits intotrinodb:masterfrom
Conversation
…ss queries that will take more than 15 minutes
|
Instead of a heartbeat, I would opt for a callback with the status of the query so I can calculate the progress percentage every time the lastest status is received during the |
…/github.com/nadavtzaysler/trino-python-client into send-query-heartbeat-while-query-is-running
|
any updates on this? entirely blocking me implementing this client anywhere in my orgs stack |
jayceslesar
reviewed
Sep 12, 2025
Comment on lines
+894
to
+899
|
|
||
| def _heartbeat_loop(self): | ||
| while all([not self._heartbeat_stop_event.is_set(), not self.finished, not self.cancelled, | ||
| self._heartbeat_enabled]): | ||
| if self._next_uri is None: | ||
| break |
There was a problem hiding this comment.
Suggested change
| def _heartbeat_loop(self): | |
| while all([not self._heartbeat_stop_event.is_set(), not self.finished, not self.cancelled, | |
| self._heartbeat_enabled]): | |
| if self._next_uri is None: | |
| break | |
| def _heartbeat_loop(self): | |
| while all([not self._heartbeat_stop_event.is_set(), self.running, | |
| self._heartbeat_enabled]): | |
| if self._next_uri is None: | |
| break |
jayceslesar
reviewed
Sep 12, 2025
| legacy_primitive_types: bool = False, | ||
| fetch_mode: Literal["mapped", "segments"] = "mapped" | ||
| fetch_mode: Literal["mapped", "segments"] = "mapped", | ||
| heartbeat_interval: float = 60.0, # seconds |
There was a problem hiding this comment.
nit: this could be a timedelta objector imo better to just name it heartbeat_interval_seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
changed the python client to send heartbeats to the api in order to check if the sent query is still running
solves the issue #554
( x) This is not user-visible or docs only and no release notes are required.