Skip to content
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

feat(beat): add beat shutdown signals #8551

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

noirbizarre
Copy link
Contributor

Description

This PR is a very quick addition: it provides shutdown signals to beat using the same convention as the worker:

  • signals.beat_shutting_down dispatched when the beat process is starting its shutdown
  • signals.beat_shutdown dispatched when the beat process has completed its shutdown

Note: there was no existing test on dispatched signals so I added one testing those lifecycle signals

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.80%. Comparing base (77dbc05) to head (a4f030b).

Files Patch % Lines
celery/signals.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8551      +/-   ##
==========================================
- Coverage   77.81%   77.80%   -0.01%     
==========================================
  Files         150      150              
  Lines       18688    18692       +4     
  Branches     3194     3194              
==========================================
+ Hits        14542    14544       +2     
- Misses       3854     3856       +2     
  Partials      292      292              
Flag Coverage Δ
unittests 77.78% <50.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.

@auvipy auvipy self-requested a review October 3, 2023 10:49
@@ -656,6 +656,25 @@ beat` is started as an embedded process.

Sender is the :class:`celery.beat.Service` instance.

.. signal:: beat_shutting_down

``beat_shutting_down``
Copy link
Member

Choose a reason for hiding this comment

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

can we think about better naming? also it would be nice to have some more context about when and why this should be used

@auvipy auvipy added this to the 5.4 milestone Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants