Sfoglia il codice sorgente

Pidbox now always sets accept encoding to json only. Closes #1870

Ask Solem 11 anni fa
parent
commit
4d71c3c9e4
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 2
      celery/app/control.py
  2. 1 0
      celery/worker/pidbox.py

+ 1 - 2
celery/app/control.py

@@ -125,8 +125,7 @@ class Control(object):
 
     def __init__(self, app=None):
         self.app = app
-        self.mailbox = self.Mailbox('celery', type='fanout',
-                                    accept=self.app.conf.CELERY_ACCEPT_CONTENT)
+        self.mailbox = self.Mailbox('celery', type='fanout', accept=['json'])
 
     @cached_property
     def inspect(self):

+ 1 - 0
celery/worker/pidbox.py

@@ -44,6 +44,7 @@ class Pidbox(object):
     def start(self, c):
         self.node.channel = c.connection.channel()
         self.consumer = self.node.listen(callback=self.on_message)
+        self.consumer.on_decode_error = c.on_decode_error
 
     def on_stop(self):
         pass