[BUG] celery/restart bug
ben-bay opened this issue ยท 1 comments
ben-bay commented
๐ Bug Report
Describe the bug
Looks like this:
ERROR:celery.app.trace:Task merlin.common.tasks.merlin_step[31704a45-84d0-4b5a-8c71-4d9aa55cd9f2] raised unexpected: RuntimeError('Never call result.get() within a tas
k!\nSee http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks\n',)
Traceback (most recent call last):
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/app/base.py", line 487, in run
return task._orig_run(*args, **kwargs)
File "/Users/bay1/merlin/merlin/common/tasks.py", line 130, in merlin_step
raise RestartException
merlin.exceptions.RestartException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/app/base.py", line 500, in run
raise task.retry(exc=exc, **retry_kwargs)
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/app/task.py", line 716, in retry
S.apply().get()
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/result.py", line 1027, in get
assert_will_not_block()
File "/Users/bay1/merlin/venv_merlin/lib/python3.6/site-packages/celery/result.py", line 43, in assert_will_not_block
raise RuntimeError(E_WOULDBLOCK)
RuntimeError: Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks
To Reproduce
Steps to reproduce the behavior:
- Run a single-step DAG with this as the step:
study:
- name: step1
description: step 1
run:
cmd: exit $(MERLIN_RESTART)
restart: echo "restarted :)"
- Found in
merlin run --local
mode. - Reproduced on local Mac and Quartz.
koning commented
This is a known issue in celery:
celery/celery#4661
If you run with out --local it will work.