Skip to content

Commit

Permalink
decode body bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Mar 8, 2018
1 parent a5585ca commit c32b883
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kuyruk/worker.py
Expand Up @@ -178,6 +178,8 @@ def _process_message(self, message: amqp.Message) -> None:
return

try:
if isinstance(message.body, bytes):
message.body = message.body.decode()
description = json.loads(message.body)
except Exception:
logger.error("Cannot decode message. Dropping. Message: %r", message.body)
Expand Down

0 comments on commit c32b883

Please sign in to comment.