betodealmeida commented on code in PR #31265:
URL: https://github.com/apache/superset/pull/31265#discussion_r1869935329
##########
superset/db_engine_specs/trino.py:
##########
@@ -283,6 +286,8 @@ def _execute(
)
execute_thread.start()
+ # Wait for the thread to start before continuing
+ time.sleep(0.1)
Review Comment:
You might also be able to use an event `.wait` instead of `sleep`:
```python
while not execute_event.is_set():
if cursor.query_id:
break
execute_event.wait(0.1)
```
##########
superset/db_engine_specs/trino.py:
##########
@@ -283,6 +286,8 @@ def _execute(
)
execute_thread.start()
+ # Wait for the thread to start before continuing
+ time.sleep(0.1)
Review Comment:
You might also be able to use an event `.wait` instead of `sleep`:
```python
while not execute_event.is_set():
if cursor.query_id:
break
execute_event.wait(0.1)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]