10000 Add runtime in success signal by sasirven · Pull Request #9516 · celery/celery · GitHub
[go: up one dir, main page]

Skip to content

Add runtime in success signal #9516

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add runtime in success signal #9516

wants to merge 1 commit into from

Conversation

sasirven
Copy link
@sasirven sasirven commented Jan 23, 2025

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

Description

Send the task runtime to the success signal so users can access this information.
Linked to this issue

@@ -528,7 +528,7 @@ def trace_task(uuid, args, kwargs, request=None):
if task_on_success:
task_on_success(retval, uuid, args, kwargs)
if success_receivers:
send_success(sender=task, result=retval)
send_success(sender=task, result=retval, runtime=T)
Copy link
Member

Choose a reason for hiding this comment

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

can you add a test case to verify this change?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry if the test isn't perfect, I did my best to fit it in with everything else :D.

Copy link
Author

Choose a reason for hiding this comment

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

Hello, may I resolve this change request, or are further changes required?

Copy link
Member

Choose a reason for hiding this comment

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

it seems good. but since we are on the middle of a new stable release, so thinking if we should add or hold this for a while

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, completely understand, no problem!

Copy link
codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.51%. Comparing base (778b009) to head (c85d86f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9516   +/-   ##
=======================================
  Coverage   78.51%   78.51%           
=======================================
  Files         153      153           
  Lines       19127    19127           
  Branches     2533     2533           
=======================================
  Hits        15018    15018           
  Misses       3821     3821           
  Partials      288      288           
Flag Coverage Δ
unittests 78.49% <100.00%> (ø)

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.

@sasirven sasirven force-pushed the main branch 3 times, most recently from 50a34a7 to 4deb84c Compare January 31, 2025 00:00
Copy link
Member
@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

we can consider it for v5.5 or defer to another release, @Nusnus what do you think?

Copy link
Member
@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

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

we can consider it for v5.5 or defer to another release, @Nusnus what do you think?

I agree with you @auvipy .

This is a cool PR but less fit for our current release phase.

I’d be happy to revisit it after the release.

@auvipy auvipy added this to the 5.6.0 milestone Feb 12, 2025
@auvipy auvipy modified the milestones: 5.6.0, 5.7.0 May 19, 2025
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

Successfully merging this pull request may close these issues.

3 participants
0