fix(tubesync): add worker option
This commit is contained in:
parent
6d3c62a8f0
commit
f1f1254562
|
@ -13,6 +13,12 @@ in {
|
|||
description = "tubesync launcher package";
|
||||
};
|
||||
|
||||
workers = mkOption {
|
||||
type = with types; int;
|
||||
default = 1;
|
||||
description = "maximum amount of concurrent workers";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = with types; str;
|
||||
default = "tubesync";
|
||||
|
@ -59,7 +65,6 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
systemd.services = let
|
||||
env = {
|
||||
PYTHONPATH = cfg.package.pythonPath;
|
||||
GUNICORN_PID_FILE = "${cfg.stateDir}/run/gunicorn.pid";
|
||||
GUNICORN_USER = cfg.user;
|
||||
GUNICORN_GROUP = cfg.group;
|
||||
|
@ -67,7 +72,9 @@ in {
|
|||
CONFIG_BASE_DIR = cfg.stateDir;
|
||||
DOWNLOADS_BASE_DIR = cfg.dataDir;
|
||||
TUBESYNC_DEBUG = mkIf cfg.debug "True";
|
||||
TUBESYNC_WORKERS = toString cfg.workers;
|
||||
|
||||
PYTHONPATH = cfg.package.pythonPath;
|
||||
REDIS_CONNECTION = "redis+socket://"
|
||||
+ "${cfg.stateDir}/run/redis.sock";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue