8000 Fixes #9119: inject dispatch_uid for retry-wrapped receivers by pachewise · Pull Request #9247 · celery/celery · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixes #9119: inject dispatch_uid for retry-wrapped receivers #9247

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

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

pachewise
Copy link
Contributor
@pachewise pachewise commented Sep 10, 2024

Description

Fixes #9119 (or tries to)

This approach assumes we want to do the dispatch_uid calculation for the user behind the scenes, and that we want to handle both the decorator and non-decorator usecases for signal.connect(receiver, sender=sender, retry=True)

Notes:

  • edited _make_lookup_key instead of _make_id, doesn't seem to be much of a difference, but I wanted the change as far up the stack as possible so devs can see it sooner
  • we can potentially also use functools.wraps and __wrapped__ (i.e., functools.wraps(fun)(retry_over_time) in decorator form), but this is a bit too generic for this type of solution, which may cause other issues

- edited _make_lookup_key instead of _make_id, doesn't seem to be much of a difference, but I wanted the change as far up the stack as possible so devs can see it sooner
- we can potentially also use functools.wraps and `__wrapped__` (i.e., `functools.wraps(fun)(retry_over_time)`, but this is a bit too generic for this type of solution, which may cause other issues
Copy link
codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.01%. Comparing base (690d08e) to head (3949342).
Report is 102 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9247   +/-   ##
=======================================
  Coverage   78.01%   78.01%           
=======================================
  Files         150      150           
  Lines       18828    18830    +2     
  Branches     3221     3222    +1     
=======================================
+ Hits        14689    14691    +2     
  Misses       3835     3835           
  Partials      304      304           
Flag Coverage Δ
unittests 77.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pachewise
Copy link
Contributor Author

#9119 (comment)

@auvipy auvipy requested a review from a team September 10, 2024 10:52
@thedrow thedrow merged commit ddc9bac into celery:main Sep 13, 2024
56 checks passed
@pachewise pachewise deleted the fixes/9119 branch September 13, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot disconnect a signal receiver after using Signal.connect(retry=True)
2 participants
0