This repository was archived by the owner on Mar 28, 2025. It is now read-only.
Conversation
matthewelwell
commented
Feb 21, 2025
Contributor
Author
matthewelwell
left a comment
There was a problem hiding this comment.
One minor comment, but overall I'm happy with the additions from @khvn26 .
| ) | ||
| registered_tasks[task_identifier] = registered_task | ||
|
|
||
| logger.debug( |
Contributor
Author
There was a problem hiding this comment.
I think we can probably get rid of these log statements. They're just noise, and the statement in initialise should log out all of the registered tasks on processor startup which is the desired behaviour, right?
task_processor_recurringtask table (WIP)task_processor_recurringtask table
gagantrivedi
approved these changes
Feb 25, 2025
4 tasks
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
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 WIP / PoC for a hypothesis that we are seeing a high number of updates on the
task_processor_recurringtasktable due to the fact that anupdate_or_createis called every time that a module is reloaded that includes a function decorated with@register_recurring_task().The general approach is to only update the recurring tasks when the processor starts instead. There's a chance that we could optimise this further and only do it on a deployment, but this should at least reduce the load significantly in environments that are running a lot of instances of the Flagsmith application which may also be getting terminated / instantiated regularly.