我在使用Celery运行任务时遇到了段错误。在查看了这个问题之后,似乎其他人通过用--pool=threads
开始芹菜来解决类似的问题。
当我尝试通过--pool=threads
我得到ModuleNotFoundError: No module named 'threads'
我不相信这与thread
模块相同,而No module named 'thread'
模块会抛出--pool=threads
的错误。
我如何开始使用线程,它做了什么?
关于Celery网站中http://docs.celeryproject.org/en/latest/reference/celery.bin.worker.html#cmdoption-celery-worker-p的文档非常稀少。除了与台球相关的事情之外,搜索“--pool”将不会返回任何实质内容
如果要将线程用作执行池,可以在eventlet和gevent之间进行选择。
pip install
您需要使用qazxswpoi eventlet / gevent才能使其正常工作。