We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c038f22 commit 398909cCopy full SHA for 398909c
src/databricks/sql/backend/sea/backend.py
@@ -85,6 +85,9 @@ class SeaDatabricksClient(DatabricksClient):
85
STATEMENT_PATH_WITH_ID = STATEMENT_PATH + "/{}"
86
CANCEL_STATEMENT_PATH_WITH_ID = STATEMENT_PATH + "/{}/cancel"
87
88
+ # SEA API constants
89
+ POLLING_INTERVAL_SECONDS = 0.5
90
+
91
def __init__(
92
self,
93
server_hostname: str,
@@ -456,7 +459,7 @@ def execute_command(
456
459
457
460
# Keep polling until we reach a terminal state
458
461
while state in [CommandState.PENDING, CommandState.RUNNING]:
- time.sleep(0.5) # add a small delay to avoid excessive API calls
462
+ time.sleep(self.POLLING_INTERVAL_SECONDS)
463
state = self.get_query_state(command_id)
464
465
if state != CommandState.SUCCEEDED:
0 commit comments