Skip to content

Commit 65a1b0c

Browse files
committed
Clarify error message on receiving
1 parent ec882d8 commit 65a1b0c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

graphdatascience/query_runner/termination_flag.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def set(self) -> None:
1818
pass
1919

2020
def assert_running(self) -> None:
21-
if self.is_set():
22-
raise RuntimeError("Query has been terminated")
21+
pass
2322

2423
@staticmethod
2524
def create(signals: Optional[list[signal.Signals]] = None) -> TerminationFlag:
@@ -38,7 +37,7 @@ def __init__(self, signals: list[signal.Signals]) -> None:
3837
self._event = threading.Event()
3938

4039
def receive_signal(sig: int, frame: Optional[FrameType]) -> None:
41-
logging.debug(f"Received signal {sig}. Interrupting query.")
40+
logging.info(f"Received signal {sig}.")
4241
self._event.set()
4342

4443
for sig in signals:
@@ -52,7 +51,9 @@ def set(self) -> None:
5251

5352
def assert_running(self) -> None:
5453
if self.is_set():
55-
raise RuntimeError("Query has been terminated")
54+
raise RuntimeError(
55+
"Closing client connection. Note, the query will be continued on the server-side"
56+
)
5657

5758

5859
class TerminationFlagNoop(TerminationFlag):

0 commit comments

Comments
 (0)