nixos/pretix: restart web and worker unit on failure
Found a few instances, where celery intermittently complained about a misconfigured redis instance and exited. > redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB > snapshots, but it's currently unable to persist to disk. Commands that > may modify the data set are disabled, because this instance is > configured to report errors during writes if RDB snapshotting fails > (stop-writes-on-bgsave-error option). Please check the Redis logs for > details about the RDB error.
This commit is contained in:
parent
8ee3bf512b
commit
3dfb2c685a
@ -538,6 +538,7 @@ in
|
|||||||
TimeoutStartSec = "15min";
|
TimeoutStartSec = "15min";
|
||||||
ExecStart = "${getExe' pythonEnv "gunicorn"} --bind unix:/run/pretix/pretix.sock ${cfg.gunicorn.extraArgs} pretix.wsgi";
|
ExecStart = "${getExe' pythonEnv "gunicorn"} --bind unix:/run/pretix/pretix.sock ${cfg.gunicorn.extraArgs} pretix.wsgi";
|
||||||
RuntimeDirectory = "pretix";
|
RuntimeDirectory = "pretix";
|
||||||
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -559,7 +560,10 @@ in
|
|||||||
"postgresql.service"
|
"postgresql.service"
|
||||||
];
|
];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.ExecStart = "${getExe' pythonEnv "celery"} -A pretix.celery_app worker ${cfg.celery.extraArgs}";
|
serviceConfig = {
|
||||||
|
ExecStart = "${getExe' pythonEnv "celery"} -A pretix.celery_app worker ${cfg.celery.extraArgs}";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.serviceConfig.SupplementaryGroups = mkIf cfg.nginx.enable [ "pretix" ];
|
nginx.serviceConfig.SupplementaryGroups = mkIf cfg.nginx.enable [ "pretix" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user