Skip to content

Pass interval to get_many#5931

Merged
auvipy merged 3 commits into
celery:masterfrom
swaglive:fix/group-result-interval
Feb 28, 2020
Merged

Pass interval to get_many#5931
auvipy merged 3 commits into
celery:masterfrom
swaglive:fix/group-result-interval

Conversation

@allanlei

Copy link
Copy Markdown
Contributor

Note: Before submitting this pull request, please review our contributing
guidelines
.

Description

kwargs is not passed to _iter_meta, _wait_for_pending. Due to this, options like interval are ignored.

Fixes #5930

@auvipy

auvipy commented Jan 23, 2020

Copy link
Copy Markdown
Member

File "/home/travis/build/celery/celery/celery/result.py", line 839

{r.id for r in self.results}, max_iterations=1, **kwargs,

                                                        ^

SyntaxError: invalid syntax

@auvipy auvipy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the unit test failures on python 2.7

@auvipy auvipy added this to the 4.4.x milestone Jan 24, 2020
Comment thread celery/backends/asynchronous.py Outdated
return self.result_consumer._wait_for_pending(
result, timeout=timeout,
on_interval=on_interval, on_message=on_message,
**kwargs,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have test to cover the kwargs param?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to find any existing tests for kwargs for AsyncBackendMixin._wait_for_pending, but BaseResultConsumer._wait_for_pending supports kwargs (which also doesn't seem to have tests)

@codecov

codecov Bot commented Jan 26, 2020

Copy link
Copy Markdown

Codecov Report

Merging #5931 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5931   +/-   ##
=======================================
  Coverage   83.21%   83.21%           
=======================================
  Files         145      145           
  Lines       17130    17130           
  Branches     2110     2110           
=======================================
  Hits        14254    14254           
  Misses       2661     2661           
  Partials      215      215
Impacted Files Coverage Δ
celery/backends/asynchronous.py 45.71% <ø> (ø) ⬆️
celery/result.py 58.86% <0%> (ø) ⬆️
celery/backends/redis.py 90.57% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90fe53f...9e09e84. Read the comment docs.

@allanlei

Copy link
Copy Markdown
Contributor Author

Updated for py2.7

@auvipy

auvipy commented Jan 26, 2020

Copy link
Copy Markdown
Member

celery/backends/rpc.py:20: in

from .asynchronous import AsyncBackendMixin, BaseResultConsumer

E File "/home/travis/build/celery/celery/celery/backends/asynchronous.py", line 203

E **kwargs,

E ^

E SyntaxError: invalid syntax

@allanlei

allanlei commented Feb 5, 2020

Copy link
Copy Markdown
Contributor Author

Updated for py2.7 sytnax

@thedrow

thedrow commented Feb 5, 2020

Copy link
Copy Markdown
Contributor

The build failure is due to a job being stuck for some reason.
Please restart the build.

@allanlei
allanlei force-pushed the fix/group-result-interval branch from 0194a92 to 9e09e84 Compare February 7, 2020 02:24