-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/matrix-synapse: minor improvements to implement worker-support #140979
Conversation
'console_scripts': [ | ||
- 'homeserver = synapse.app.homeserver:main' | ||
+ 'homeserver = synapse.app.homeserver:main', | ||
+ 'worker = synapse.app.generic_worker:main' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are other workers, too: https://matrix-org.github.io/synapse/v1.43/workers.html#available-worker-applications
We should create executables for each of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was just a POC, but you're right, I guess I should add all of them before merging this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this doesn't seem needed: each of these workers uses generic_worker:start
and this function decides what to do based on the name of the worker app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, everything is just a generic worker under the hood. Cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we should also set enableRedis
to true
by default in the package.
Isn't that the case already? |
We do this since #140207 😄 |
Oh, right. Forgot that got merged in :) |
From 3089758015c64cc1e6788793c4fe40a0e1783457 Mon Sep 17 00:00:00 2001 | ||
From: Maximilian Bosch <maximilian@mbosch.me> | ||
Date: Tue, 5 Oct 2021 22:33:12 +0200 | ||
Subject: [PATCH 2/2] Expose generic worker as binary under NixOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we haven't upstreamed this? That looks like something that wouldn't hurt upstream at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see: matrix-org/synapse#11449
Motivation for this change
This doesn't contain changes for actual worker-support as I haven't figured out (yet) how to properly implement this in this module.
However, there are two changes that I needed to implement it in my personal Matrix configuration:
synapse.app.generic_worker
as executable inpkgs.matrix-synapse
.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)