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

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

Merged
merged 5 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ def exec_file(path_segments):
long_description=long_description,
long_description_content_type="text/x-rst",
python_requires="~=3.6",
entry_points={
'console_scripts': [
'homeserver = synapse.app.homeserver:main',
'worker = synapse.app.generic_worker:main'
Ma27 marked this conversation as resolved.
Show resolved Hide resolved
]
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Communications :: Chat",
Expand Down
6 changes: 5 additions & 1 deletion synapse/app/generic_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ def start(config_options: List[str]) -> None:
_base.start_worker_reactor("synapse-generic-worker", config)


if __name__ == "__main__":
def main():
with LoggingContext("main"):
start(sys.argv[1:])


if __name__ == "__main__":
main()