Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait committed May 17, 2022
1 parent aaa7321 commit edc6893
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distributed/cli/tests/test_dask_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,6 @@ def test_signal_handling(loop, sig):
logs = stdout.decode().lower()
assert stderr is None
assert scheduler.returncode == 0
assert f"signal {sig}" in logs
assert sig.name.lower() in logs
assert "scheduler closing" in logs
assert "end scheduler" in logs
2 changes: 1 addition & 1 deletion distributed/cli/tests/test_dask_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ async def test_signal_handling(c, s, nanny, sig):
logs = stdout.decode().lower()
assert stderr is None
assert worker.returncode == 0
assert f"signal {sig}" in logs
assert sig.name.lower() in logs
if nanny == "--nanny":
assert "closing nanny" in logs
assert "stopping worker" in logs
Expand Down
2 changes: 1 addition & 1 deletion distributed/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def handle_signal(signum, frame):
# Restore old signal handler to allow for quicker exit
# if the user sends the signal again.
signal.signal(signum, old_handlers[signum])
logger.info("Received signal %d", signum)
logger.info("Received signal %s (%d)", signal.Signals(signum).name, signum)
loop.call_soon_threadsafe(event.set)

for sig in signals:
Expand Down

0 comments on commit edc6893

Please sign in to comment.