-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
ref(crons): Simplify monitor clock implementation #54388
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
evanpurkhiser
merged 1 commit into
master
from
evanpurkhiser/ref-crons-simplify-monitor-clock-implementation
Aug 10, 2023
Merged
ref(crons): Simplify monitor clock implementation #54388
evanpurkhiser
merged 1 commit into
master
from
evanpurkhiser/ref-crons-simplify-monitor-clock-implementation
Aug 10, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evanpurkhiser
commented
Aug 8, 2023
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #54388 +/- ##
=======================================
Coverage 79.74% 79.74%
=======================================
Files 4991 4991
Lines 211939 211944 +5
Branches 36115 36117 +2
=======================================
+ Hits 169008 169018 +10
+ Misses 37731 37728 -3
+ Partials 5200 5198 -2
|
rjo100
reviewed
Aug 8, 2023
9fd307b
to
6de6726
Compare
rjo100
approved these changes
Aug 9, 2023
This is a follow up to GH-54204 as suggested by @fpacifici #53661 (comment) > Can we just have the pulse message running in both modes and treat > everything as high volume mode? Instead of having two modes, we can simply always use the same logic for dispatching the monitor tasks on the minute roll-over, using the consumer as a clock. Previously the worry here was that in low-volume check-in situations nothing would drive the clock and we would need to have an external clock, with a different way to dispatch the tasks. But there is no need for a different way to dispatch the tasks, we can have an external clock that pulses messages into the topic and we can simply use the same logic already implemented to use the topic messages as a clock. This change removes the concept of "high volume" / "low volume" and adds the concept of a "clock_pulse" message to the consumer. In a follow up PR we will introduce the celery beat task which produces the clock_pulse messages.
6de6726
to
a2b55a6
Compare
evanpurkhiser
added a commit
that referenced
this pull request
Aug 10, 2023
This is no longer needed after GH-54388
evanpurkhiser
added a commit
that referenced
this pull request
Aug 10, 2023
This is no longer needed after GH-54388
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow up to GH-54204 as suggested by @fpacifici
#53661 (comment)
Instead of having two modes, we can simply always use the same logic for
dispatching the monitor tasks on the minute roll-over, using the
consumer as a clock.
Previously the worry here was that in low-volume check-in situations
nothing would drive the clock and we would need to have an external
clock, with a different way to dispatch the tasks. But there is no need
for a different way to dispatch the tasks, we can have an external clock
that pulses messages into the topic and we can simply use the same logic
already implemented to use the topic messages as a clock.
This change removes the concept of "high volume" / "low volume" and adds
the concept of a "clock_pulse" message to the consumer.
In a follow up PR we will introduce the celery beat task which produces
the clock_pulse messages.