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

Commit

Permalink
Pull out things from ns at point of use
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Jun 30, 2022
1 parent 821b473 commit 3bd858f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions synapse/app/complement_fork_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,12 @@ def main() -> None:
"Subsequent arguments are passed through.",
)
ns = parser.parse_args()
db_config_path = ns.db_config
args = ns.args

# Split up the subsequent arguments into each workers' arguments;
# `--` is our delimiter of choice.
args_by_worker: List[List[str]] = [
list(args)
for cond, args in itertools.groupby(args, lambda ele: ele != "--")
for cond, args in itertools.groupby(ns.args, lambda ele: ele != "--")
if cond and args
]

Expand All @@ -159,7 +157,7 @@ def main() -> None:
[
"update_synapse_database",
"--database-config",
db_config_path,
ns.db_config,
"--run-background-updates",
],
),
Expand Down

0 comments on commit 3bd858f

Please sign in to comment.