Skip to content

Commit e5f1c27

Browse files
committed
Add more debug logs
1 parent 649b5e5 commit e5f1c27

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/isolate/connections/grpc/agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def abort_with_msg(
224224

225225
def handle_shutdown(self) -> None:
226226
if self._current_callable is None:
227+
print("No current callable, skipping shutdown.")
227228
return
228229

229230
# Check for teardown on the callable itself or on the wrapped function
@@ -272,7 +273,9 @@ def run_agent(address: str, log_fd: int | None = None) -> int:
272273

273274
# Set up SIGTERM handler
274275
def sigterm_handler(signum, frame):
276+
print("Received SIGTERM, shutting down the agent...")
275277
servicer.handle_shutdown()
278+
priint("Shutdown complete, stopping the agent server.")
276279
server.stop(grace=0.1)
277280
executor.shutdown(wait=False, cancel_futures=True)
278281

src/isolate/server/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def cancel(self):
185185
self.future.cancel()
186186

187187
if self.agent:
188+
print("Terminating the agent...")
188189
self.agent.terminate()
189190

190191
try:

0 commit comments

Comments
 (0)