-
Notifications
You must be signed in to change notification settings - Fork 402
Move start_doing_background_updates()
to SynapseHomeServer.start_background_tasks()
#19036
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
MadLittleMods
merged 3 commits into
develop
from
madlittlemods/move-start-background-updates
Oct 10, 2025
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Move `start_doing_background_updates()` to `SynapseHomeServer.start_background_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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one difference here is that previously,
start_doing_background_updates()
only ran on the main Synapse instance.But
start_background_tasks()
runs on the worker that supposed torun_background_tasks
.synapse/synapse/app/_base.py
Lines 683 to 684 in 47fb4b4
Is that okay? Nothing is immediately coming to mind on why this would be bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems OK to me too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think there is a flaw with this setup.
SynapseHomeServer
is for the main Synapse instance. We haveSynapseHomeServer.start_background_tasks()
setup to callstart_doing_background_updates()
but if therun_background_tasks_on
is set to anything else besidesmain
, then we will never runSynapseHomeServer.start_background_tasks()
specifically.What we actually need to do is just move this to
HomeServer.start_background_tasks()
instead. We wantstart_doing_background_updates()
to run on whatever homeserver is configured torun_background_tasks_on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being addressed in #19057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deciding to revert this PR in the meantime -> #19059
While I figure out all of the intricacies in the test infrastructure from moving it to the correct spot. Will re-introduce things in #19057