Skip to content

Build failing with Never call result.get() within a task #4642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stackexpress-shivam opened this issue Sep 18, 2018 · 2 comments
Closed

Build failing with Never call result.get() within a task #4642

stackexpress-shivam opened this issue Sep 18, 2018 · 2 comments

Comments

@stackexpress-shivam
Copy link

Details

Expected Result

The build should pass

Actual Result

Failing with following error

18/Sep/2018 09:33:52] readthedocs.core.symlink:293[10250]: INFO (Build) [shivam-demo:] Symlinking Version: Version latest of shivam-demo (20)
[18/Sep/2018 09:33:52] readthedocs.projects.tasks:1201[10250]: INFO (Build) [shivam-demo:] Updating static metadata
[18/Sep/2018 09:33:52] celery.app.trace:124[10250]: INFO Task readthedocs.projects.tasks.sync_files[7b804f09-cc03-4aa5-85eb-f56d30c7fb85] succeeded in 0.09603784999944764s: None
[18/Sep/2018 09:33:52] readthedocs.doc_builder.environments:511[10250]: ERROR (Build) [shivam-demo:latest] Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks
Traceback (most recent call last):
File "/root/s/rtd/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 507, in run_build
epub=bool(outcomes['epub']),
File "/root/s/rtd/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 645, in update_app_instances
callback=sync_callback.s(version_pk=self.version.pk, commit=self.build['commit']),
File "/root/s/rtd/checkouts/readthedocs.org/readthedocs/core/utils/init.py", line 52, in broadcast
task_promise = chord(tasks, callback).apply_async()
File "/root/s/rtd/lib/python3.6/site-packages/celery/canvas.py", line 1230, in apply_async
body=body, task_id=task_id, **options)
File "/root/s/rtd/lib/python3.6/site-packages/celery/canvas.py", line 1239, in apply
args=(tasks.apply(args, kwargs).get(propagate=propagate),),
File "/root/s/rtd/lib/python3.6/site-packages/celery/result.py", line 671, in get
on_interval=on_interval,
File "/root/s/rtd/lib/python3.6/site-packages/celery/result.py", line 722, in join
assert_will_not_block()
File "/root/s/rtd/lib/python3.6/site-packages/celery/result.py", line 41, 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

[18/Sep/2018 09:33:52] readthedocs.doc_builder.environments:621[10250]: ERROR Build failed with unhandled exception: Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks

[18/Sep/2018 09:33:52] "PUT /api/v2/build/4/ HTTP/1.1" 200 49275

@stsewd
Copy link
Member

stsewd commented Sep 18, 2018

Thank you for filling up this issue, closing as duplicate of #4640

@stsewd stsewd closed this as completed Sep 18, 2018
@stsewd
Copy link
Member

stsewd commented Sep 18, 2018

Also, you shouldn't use rtd on debug mode in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants