2012-04-18 47 views
1

我升級我的芹菜從2.4.X芹菜-2.5.2,然後修改了Broker_URL是Django的芹菜2.5.3 BROKER_URL錯誤「沒有這樣的運輸:MySQL的

BROKER_TRANSPORT = "sqlalchemy" 
BROKER_URL = "sqla+mysql://root:[email protected]:3306/db" 

這個配置可以通過http://docs.celeryproject.org/en/latest/getting-started/brokers/sqlalchemy.html#broker-sqlalchemy

的頁面提到,芹菜過程可以成功啓動,但我打電話。 延遲apply_async過程中會拋出異常KeyError異常:「沒有這樣的運輸:mysql的」 我不知道這個想法..貌似一切都應該是正確的。


回溯

Traceback (most recent call last):

File "<console>", line 1, in <module> 
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\task\__init__.py", line 353, in delay 
    return self.apply_async(args, kwargs) 
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\task\__init__.py", line 449, in apply_async 
    publish = publisher or self.app.amqp.publisher_pool.acquire(block=True) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 625, in acquire 
    R = self.prepare(R) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\pools.py", line 55, in prepare 
    p = p() 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\pools.py", line 46, in <lambda> 
    return lambda: self.create_producer() 
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 265, in create_producer 
    pub = self.app.amqp.TaskPublisher(conn, auto_declare=False) 
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 328, in TaskPublisher 
    return TaskPublisher(*args, **self.app.merge(defaults, kwargs)) 
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 158, in __init__ 
    super(TaskPublisher, self).__init__(*args, **kwargs) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\compat.py", line 61, in __init__ 
    super(Publisher, self).__init__(connection, self.exchange, **kwargs) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\messaging.py", line 69, in __init__ 
    channel = channel.default_channel 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 556, in default_channel 
    self.connection 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 549, in connection 
self._connection = self._establish_connection() 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 509, in _establish_connection 
    conn = self.transport.establish_connection() 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 569, in transport 
    self._transport = self.create_transport() 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 324, in create_transport 
    return self.get_transport_cls()(client=self) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 331, in get_transport_cls 
    transport_cls = get_transport_cls(transport_cls) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport__init__.py", line 94, in get_transport_cls 
    _transport_cache[transport] = _get_transport_cls(transport) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport\__init__.py", line 75, in _get_transport_cls 
    transport_module_name, transport_cls_name = resolve_transport(transport) 
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport\__init__.py", line 70, in resolve_transport 
    raise KeyError("No such transport: %s" % (transport,)) 
KeyError: 'No such transport: mysql' 
+0

從調用'.delay'或從芹菜進程中拋出異常?這些任務是否有結果?使用'(ignore_result = True)'開始任務是否會改變任何事情? – dgel 2012-04-18 18:42:47

+0

是的,從芹菜過程中,甚至使用Django shell(manage.py shell),任務將失敗我設置了ignore_result = True或者不是,聽起來像配置有問題,但我仍然不知道什麼是問題。你有什麼建議嗎? – Yooi 2012-04-19 03:27:24

+0

我對2.5.3和postgresql有這個確切的問題。我確定它是一個配置問題,但我不能在我的生活中找出解決方案。 – bouvard 2012-04-19 14:24:07

回答

2

一些調試後,我已經跟蹤下來到正在安裝的版本的kombuKombu 2.1.5 was released on April 13th,似乎不兼容。我能夠通過明確降級到版本2.1.3來解決此問題。

+0

謝謝。我必須使用2.1.3並等待2.1.5修復 – Yooi 2012-04-21 02:01:12