Minor addition to chatroom test

This commit is contained in:
Nocturn9x 2023-05-10 12:13:47 +02:00
parent b875093c8a
commit 089d525def
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ async def message_handler(q: aiosched.Queue):
logging.info(f"Got message {msg!r} with the following payload: {payload}")
except Exception as e:
logging.error(f"An exception occurred in the message handler -> {type(e).__name__}: {e}")
except aiosched.errors.Cancelled:
logging.warning(f"Cancellation detected, message handler shutting down")
# Propagate the cancellation
raise
async def serve(bind_address: tuple):