I am running celery worker(version 4.4) on windows machine, when I run the worker with -P eventlet option it throws Attribute error.
Error logs are as follows:-
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (most recent call last):
File "d:\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\G-US01.Test\.virtualenvs\celery-z5n-38Vt\Scripts\celery.exe\__main__.py", line 7, in <module>
File "c:\users\g-us01.test\.virtualenvs\celery-z5n-38vt\lib\site-packages\celery\__main__.py", line 14, in main
maybe_patch_concurrency()
File "c:\users\g-us01.test\.virtualenvs\celery-z5n-38vt\lib\site-packages\celery\__init__.py", line 152, in maybe_patch_concurrency
patcher()
File "c:\users\g-us01.test\.virtualenvs\celery-z5n-38vt\lib\site-packages\celery\__init__.py", line 109, in _patch_eventlet
eventlet.monkey_patch()
File "c:\users\g-us01.test\.virtualenvs\celery-z5n-38vt\lib\site-packages\eventlet\patcher.py", line 334, in monkey_patch
fix_threading_active()
File "c:\users\g-us01.test\.virtualenvs\celery-z5n-38vt\lib\site-packages\eventlet\patcher.py", line 331, in fix_threading_active
_os.register_at_fork(
AttributeError: module 'os' has no attribute 'register_at_fork'
I have installed eventlet in virtual environment, the pipfile contents are as follows:-
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
rope = "*"
autopep8 = "*"
[packages]
eventlet = "*"
psutil = "*"
celery = "*"
pythonnet = "*"
redis = "*"
gevent = "*"
[requires]
python_version = "3.7"
Please let me know where I am going wrong.