Ver Fonte

Fixed basic.publish command in celery amqp program

Example from docs

basic.publish 'This is a message!' testexchange testkey

fail with

must be string or read-only character buffer, not Message

After change to str, works good.
Andrey Voronov há 11 anos atrás
pai
commit
8ee20bb753
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      celery/bin/amqp.py

+ 1 - 1
celery/bin/amqp.py

@@ -175,7 +175,7 @@ class AMQShell(cmd.Cmd):
         'basic.get': Spec(('queue', str),
                           ('no_ack', bool, 'off'),
                           returns=dump_message),
-        'basic.publish': Spec(('msg', Message),
+        'basic.publish': Spec(('msg', str),
                               ('exchange', str),
                               ('routing_key', str),
                               ('mandatory', bool, 'no'),