不能把卡桑德拉和芹菜放在一起



我正在尝试将芹菜和卡桑德拉一起使用的示例:http://datastax.github.io/python-driver/cqlengine/third_party.html但没有运气。

我收到此异常,我正在启动工作线程:$ 芹菜 -A 任务工人 -l 信息

[2016-06-12 14:11:53,609: ERROR/Worker-1] Process Worker-1
Traceback (most recent call last):
File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/process.py",  line 292, in _bootstrap
self.run()
File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/pool.py", line 292, in run
self.after_fork()
File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/pool.py", line 395, in after_fork
self.initializer(*self.initargs)
File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/celery/concurrency/prefork.py", line 84, in process_initializer
signals.worker_process_init.send(sender=None)
File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/celery/utils/dispatch/signal.py", line 166, in send
response = receiver(signal=self, sender=sender, **named)
TypeError: cassandra_init() got an unexpected keyword argument 'sender'

我正在使用osx el Capitan,python 3.5.1,Celery 3.1.23和cassandra 3.5。

因此,欢迎任何帮助。

cassandra_init信号处理程序函数需要接受任意关键字参数。

只需更改行:

def cassandra_init():

到:

def cassandra_init(**kwargs):

有关 Celery 信号的更多信息,请参阅以下用户指南:http://docs.celeryproject.org/en/latest/userguide/signals.html#basics

注意:如果您还向该教程的作者提交了某种报告,这将很有帮助。 芹菜信号处理程序总是需要关键字参数,所以很难过那里有不起作用的例子。

相关内容

  • 没有找到相关文章

最新更新