Skip to content

Commit 631eed9

Browse files
Fix bad merge with start_background_tasks (#19013)
This was originally removed in #18886 but it looks like it snuck back in #18828 during a [bad merge](4cd3d91). Noticed while looking at Synapse setup and startup (just by happen stance). I don't think this has adverse effects on Synapse actually working and `start_background_tasks()` can be called multiple times. ### Is there a good way to audit all of these merges? As I would like to see the conflicts for each merge. This works but it's still hard to notice anything is wrong: ``` git log --remerge-diff <commit-sha> ``` > shows the difference from mechanical merge result and the result that is actually recorded in a merge commit via https://stackoverflow.com/questions/15277708/how-do-you-see-show-a-git-merge-conflict-resolution-that-was-done-given-a-mer/71181334#71181334 The following better. Specify the version range to the commit right before the merge to the merge. And can even specify which file to look at to make it more obvious with the hindsight we have now. ``` git log --remerge-diff <merge-commit-sha>~1..<merge-commit-sha> -- synapse/server.py ``` Example: ``` git log --remerge-diff 4cd3d91~1..4cd3d91 -- synapse/server.py ```
1 parent 7b88313 commit 631eed9

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

changelog.d/19013.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove duplicate call to `hs.start_background_tasks()` introduced from a bad merge.

synapse/server.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,6 @@ def setup(self) -> None:
613613
self.datastores = Databases(self.DATASTORE_CLASS, self)
614614
logger.info("Finished setting up.")
615615

616-
# Register background tasks required by this server. This must be done
617-
# somewhat manually due to the background tasks not being registered
618-
# unless handlers are instantiated.
619-
if self.config.worker.run_background_tasks:
620-
self.start_background_tasks()
621-
622616
# def __del__(self) -> None:
623617
# """
624618
# Called when an the homeserver is garbage collected.

0 commit comments

Comments
 (0)