celery4.0.2在linux中运行问题

来源:3-3 定时任务

搞事爱学

2018-10-11 12:26

celery4.0.2在linux中的运行结果,如下。
这好像是权限的问题,不太确定,有没有遇到的或知道怎么解决的?

/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/platforms.py:793: RuntimeWarning: You're running the worker with superuser privileges: this is

absolutely not recommended!


Please specify a different user using the -u option.


User information: uid=0 euid=0 gid=0 egid=0


  uid=uid, euid=euid, gid=gid, egid=egid,

Traceback (most recent call last):

  File "/usr/python3.6/lib/python3.6/site-packages/kombu-4.2.1-py3.6.egg/kombu/transport/base.py", line 123, in __getattr__

    return self[key]

KeyError: 'async'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/bin/celery", line 9, in <module>

    load_entry_point('celery==4.0.2', 'console_scripts', 'celery')()

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/__main__.py", line 14, in main

    _main()

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/celery.py", line 326, in main

    cmd.execute_from_commandline(argv)

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/celery.py", line 488, in execute_from_commandline

    super(CeleryCommand, self).execute_from_commandline(argv)))

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/base.py", line 281, in execute_from_commandline

    return self.handle_argv(self.prog_name, argv[1:])

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/celery.py", line 480, in handle_argv

    return self.execute(command, argv)

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/celery.py", line 412, in execute

    ).run_from_argv(self.prog_name, argv[1:], command=argv[0])

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/worker.py", line 221, in run_from_argv

    return self(*args, **options)

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/base.py", line 244, in __call__

    ret = self.run(*args, **kwargs)

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/bin/worker.py", line 255, in run

    **kwargs)

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/worker/worker.py", line 99, in __init__

    self.setup_instance(**self.prepare_args(**kwargs))

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/worker/worker.py", line 122, in setup_instance

    self.should_use_eventloop() if use_eventloop is None

  File "/usr/python3.6/lib/python3.6/site-packages/celery-4.0.2-py3.6.egg/celery/worker/worker.py", line 241, in should_use_eventloop

    self._conninfo.transport.implements.async and

  File "/usr/python3.6/lib/python3.6/site-packages/kombu-4.2.1-py3.6.egg/kombu/transport/base.py", line 125, in __getattr__

    raise AttributeError(key)

AttributeError: async


写回答 关注

3回答

  • 一个很坏的好人
    2019-01-01 16:47:02

    升级celery即可:pip install --upgrade https://github.com/celery/celery/tarball/master

  • lho5
    2018-10-11 15:35:48

    因为async在python3.6中是关键字,你可以改源码,或者安装python3.5

  • lho5
    2018-10-11 15:34:47

    你的python版本太高了,请使用3.5.0

Python 异步任务队列 Celery 使用

Python 异步任务队列神器 celery 的使用

10849 学习 · 43 问题

查看课程

相似问题