mirror of
https://github.com/django/daphne.git
synced 2025-04-22 09:42:07 +03:00
Make worker print exceptions rather than explode
This commit is contained in:
parent
15b54b4887
commit
39a82e2a5c
|
@ -1,4 +1,4 @@
|
|||
import time
|
||||
import traceback
|
||||
|
||||
|
||||
class Worker(object):
|
||||
|
@ -22,4 +22,7 @@ class Worker(object):
|
|||
consumer = self.channel_backend.registry.consumer_for_channel(channel)
|
||||
if self.callback:
|
||||
self.callback(channel, message)
|
||||
consumer(channel=channel, **message)
|
||||
try:
|
||||
consumer(channel=channel, **message)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
|
Loading…
Reference in New Issue
Block a user