Skip to content
Snippets Groups Projects
Unverified Commit 42bf0204 authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

Expose worker & homeserver as entrypoints in `setup.py` (#11449)


Co-authored-by: default avatarreivilibre <oliverw@matrix.org>
parent 379f2650
Branches
Tags
No related merge requests found
Expose synapse_homeserver and synapse_worker commands as entry points to run Synapse's main process and worker processes, respectively. Contributed by @Ma27.
...@@ -152,6 +152,12 @@ setup( ...@@ -152,6 +152,12 @@ setup(
long_description=long_description, long_description=long_description,
long_description_content_type="text/x-rst", long_description_content_type="text/x-rst",
python_requires="~=3.6", python_requires="~=3.6",
entry_points={
"console_scripts": [
"synapse_homeserver = synapse.app.homeserver:main",
"synapse_worker = synapse.app.generic_worker:main",
]
},
classifiers=[ classifiers=[
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
"Topic :: Communications :: Chat", "Topic :: Communications :: Chat",
......
...@@ -505,6 +505,10 @@ def start(config_options: List[str]) -> None: ...@@ -505,6 +505,10 @@ def start(config_options: List[str]) -> None:
_base.start_worker_reactor("synapse-generic-worker", config) _base.start_worker_reactor("synapse-generic-worker", config)
if __name__ == "__main__": def main() -> None:
with LoggingContext("main"): with LoggingContext("main"):
start(sys.argv[1:]) start(sys.argv[1:])
if __name__ == "__main__":
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment