Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add --run-background-updates option to update_database script. #10954

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move main script block into separate function.
  • Loading branch information
Fizzadar committed Oct 3, 2021
commit 6da417509229531e7112530b8bb21b6cd1656ddf
6 changes: 5 additions & 1 deletion scripts-dev/update_database
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def run_background_updates(hs):
reactor.run()


if __name__ == "__main__":
def main():
parser = argparse.ArgumentParser(
description=(
"Updates a synapse database to the latest schema and runs background updates"
Expand Down Expand Up @@ -110,3 +110,7 @@ if __name__ == "__main__":

if args.run_background_updates:
run_background_updates(hs)


if __name__ == "__main__":
main()