Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
f4d93ae4
Commit
f4d93ae4
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Actually make it work
parent
f68e4cf6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/app/synctl.py
+10
-2
10 additions, 2 deletions
synapse/app/synctl.py
synapse/config/workers.py
+5
-0
5 additions, 0 deletions
synapse/config/workers.py
with
15 additions
and
2 deletions
synapse/app/synctl.py
+
10
−
2
View file @
f4d93ae4
...
...
@@ -207,11 +207,19 @@ def main():
# We need to special case all of this to pick up options that may
# be set in the main config file or in this worker config file.
worker_pidfile
=
(
worker_config
.
get
(
"
worker_pid_file
"
)
or
worker_config
(
"
pid_file
"
)
worker_config
.
get
(
"
pid_file
"
)
or
pidfile
)
worker_cache_factor
=
worker_config
.
get
(
"
synctl_cache_factor
"
)
or
cache_factor
daemonize
=
worker_config
.
get
(
"
daemonize
"
)
or
config
.
get
(
"
daemonize
"
)
assert
daemonize
,
"
Main process must have daemonize set to true
"
# The master process doesn't support using worker_* config.
for
key
in
worker_config
:
if
key
==
"
worker_app
"
:
# But we allow worker_app
continue
assert
not
key
.
startswith
(
"
worker_
"
),
\
"
Main process cannot use worker_* config
"
else
:
worker_pidfile
=
worker_config
[
"
worker_pid_file
"
]
worker_daemonize
=
worker_config
[
"
worker_daemonize
"
]
...
...
This diff is collapsed.
Click to expand it.
synapse/config/workers.py
+
5
−
0
View file @
f4d93ae4
...
...
@@ -23,6 +23,11 @@ class WorkerConfig(Config):
def
read_config
(
self
,
config
):
self
.
worker_app
=
config
.
get
(
"
worker_app
"
)
# Canonicalise worker_app so that master always has None
if
self
.
worker_app
==
"
synapse.app.homeserver
"
:
self
.
worker_app
=
None
self
.
worker_listeners
=
config
.
get
(
"
worker_listeners
"
)
self
.
worker_daemonize
=
config
.
get
(
"
worker_daemonize
"
)
self
.
worker_pid_file
=
config
.
get
(
"
worker_pid_file
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment