fix(beat): debug statement should only log AsyncResult.id if it exists#8428
fix(beat): debug statement should only log AsyncResult.id if it exists#8428Nusnus merged 1 commit intocelery:mainfrom bmrobin:main
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 anAsyncResultcontaining 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