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
fix(beat): debug statement should only log AsyncResult.id if it exists #8428
Conversation
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #8428 +/- ##
=======================================
Coverage 87.42% 87.42%
=======================================
Files 148 148
Lines 18477 18479 +2
Branches 3153 3154 +1
=======================================
+ Hits 16153 16155 +2
Misses 2034 2034
Partials 290 290
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Seems to be an issue with Python 3.8 not supporting the given syntax, but except for this small issue LGTM ✅ |
@Nusnus noted. i tried what the "contributing" guide suggested with i ran the test i wrote locally on py3.11 but i'll check with |
Can you link me the guide you followed? I'd be happy to review it.
Awesome thanks! |
Thank you ❤️ |
Description
celery.beat.apply_entry()
assumes thatapply_async()
will return anAsyncResult
containing an ID. this is not always the case: for example when Django'stransaction.on_commit()
wraps the invoked task. this proposed fix simply modifies thedebug()
logging statement to more safely handle the result that is being logged after the task is created.Fixes #8372