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
7cd34512
Commit
7cd34512
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
When using synctl with workers, don't start the main synapse automatically
parent
07ab948c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.rst
+7
-0
7 additions, 0 deletions
CHANGES.rst
synapse/app/synctl.py
+26
-8
26 additions, 8 deletions
synapse/app/synctl.py
with
33 additions
and
8 deletions
CHANGES.rst
+
7
−
0
View file @
7cd34512
Unreleased
==========
synctl no longer starts the main synapse when using ``-a`` option with workers.
A new worker file should be added with ``worker_app: synapse.app.homeserver``
Changes in synapse v0.26.0 (2018-01-05)
Changes in synapse v0.26.0 (2018-01-05)
=======================================
=======================================
...
...
This diff is collapsed.
Click to expand it.
synapse/app/synctl.py
+
26
−
8
View file @
7cd34512
...
@@ -184,6 +184,9 @@ def main():
...
@@ -184,6 +184,9 @@ def main():
worker_configfiles
.
append
(
worker_configfile
)
worker_configfiles
.
append
(
worker_configfile
)
if
options
.
all_processes
:
if
options
.
all_processes
:
# To start the main synapse with -a you need to add a worker file
# with worker_app == "synapse.app.homeserver"
start_stop_synapse
=
False
worker_configdir
=
options
.
all_processes
worker_configdir
=
options
.
all_processes
if
not
os
.
path
.
isdir
(
worker_configdir
):
if
not
os
.
path
.
isdir
(
worker_configdir
):
write
(
write
(
...
@@ -200,14 +203,29 @@ def main():
...
@@ -200,14 +203,29 @@ def main():
with
open
(
worker_configfile
)
as
stream
:
with
open
(
worker_configfile
)
as
stream
:
worker_config
=
yaml
.
load
(
stream
)
worker_config
=
yaml
.
load
(
stream
)
worker_app
=
worker_config
[
"
worker_app
"
]
worker_app
=
worker_config
[
"
worker_app
"
]
worker_pidfile
=
worker_config
[
"
worker_pid_file
"
]
if
worker_app
==
"
synapse.app.homeserver
"
:
worker_daemonize
=
worker_config
[
"
worker_daemonize
"
]
# We need to special case all of this to pick up options that may
assert
worker_daemonize
,
"
In config %r: expected
'
%s
'
to be True
"
%
(
# be set in the main config file or in this worker config file.
worker_configfile
,
"
worker_daemonize
"
)
worker_pidfile
=
(
worker_cache_factor
=
worker_config
.
get
(
"
synctl_cache_factor
"
)
worker_config
.
get
(
"
worker_pid_file
"
)
workers
.
append
(
Worker
(
or
worker_config
(
"
pid_file
"
)
worker_app
,
worker_configfile
,
worker_pidfile
,
worker_cache_factor
,
or
pidfile
))
)
workers
.
append
(
Worker
(
"
synapse.app.homeserver
"
,
worker_configfile
,
worker_pidfile
,
worker_config
.
get
(
"
synctl_cache_factor
"
)
or
cache_factor
,
))
else
:
worker_pidfile
=
worker_config
[
"
worker_pid_file
"
]
worker_daemonize
=
worker_config
[
"
worker_daemonize
"
]
assert
worker_daemonize
,
"
In config %r: expected
'
%s
'
to be True
"
%
(
worker_configfile
,
"
worker_daemonize
"
)
worker_cache_factor
=
worker_config
.
get
(
"
synctl_cache_factor
"
)
workers
.
append
(
Worker
(
worker_app
,
worker_configfile
,
worker_pidfile
,
worker_cache_factor
,
))
action
=
options
.
action
action
=
options
.
action
...
...
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