Skip to content

Commit f7083cc

Browse files
Mats-SXFlorentinD
andcommitted
Timeout send_action after 10 seconds
Co-authored-by: Florentin Dörre <florentin.dorre@neo4j.com>
1 parent 27404dc commit f7083cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graphdatascience/query_runner/gds_arrow_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,10 @@ def _send_action(self, action_type: str, meta_data: dict[str, Any]) -> dict[str,
640640
)
641641
def send_with_retry() -> dict[str, Any]:
642642
try:
643-
result = client.do_action(flight.Action(action_type, json.dumps(meta_data).encode("utf-8")))
643+
result = client.do_action(
644+
action=flight.Action(action_type, json.dumps(meta_data).encode("utf-8")),
645+
options=flight.FlightCallOptions(timeout=10.0)
646+
)
644647

645648
# Consume result fully to sanity check and avoid cancelled streams
646649
collected_result = list(result)

0 commit comments

Comments
 (0)