mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 20:53:22 +00:00
Merge pull request #207754 from leona-ya/paperless-ngx/fix-module-1.10.2
fixes https://github.com/NixOS/nixpkgs/issues/207965
This commit is contained in:
commit
ad8ae1b208
@ -211,19 +211,15 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.paperless-scheduler = {
|
systemd.services.paperless-scheduler = {
|
||||||
description = "Paperless scheduler";
|
description = "Paperless Celery Beat";
|
||||||
serviceConfig = defaultServiceConfig // {
|
serviceConfig = defaultServiceConfig // {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
ExecStart = "${pkg}/bin/paperless-ngx qcluster";
|
ExecStart = "${pkg}/bin/celery --app paperless beat --loglevel INFO";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
# The `mbind` syscall is needed for running the classifier.
|
|
||||||
SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ];
|
|
||||||
# Needs to talk to mail server for automated import rules
|
|
||||||
PrivateNetwork = false;
|
|
||||||
};
|
};
|
||||||
environment = env;
|
environment = env;
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "paperless-consumer.service" "paperless-web.service" ];
|
wants = [ "paperless-consumer.service" "paperless-web.service" "paperless-task-queue.service" ];
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
ln -sf ${manage} ${cfg.dataDir}/paperless-manage
|
ln -sf ${manage} ${cfg.dataDir}/paperless-manage
|
||||||
@ -250,6 +246,20 @@ in
|
|||||||
after = [ "redis-paperless.service" ];
|
after = [ "redis-paperless.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.paperless-task-queue = {
|
||||||
|
description = "Paperless Celery Workers";
|
||||||
|
serviceConfig = defaultServiceConfig // {
|
||||||
|
User = cfg.user;
|
||||||
|
ExecStart = "${pkg}/bin/celery --app paperless worker --loglevel INFO";
|
||||||
|
Restart = "on-failure";
|
||||||
|
# The `mbind` syscall is needed for running the classifier.
|
||||||
|
SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ];
|
||||||
|
# Needs to talk to mail server for automated import rules
|
||||||
|
PrivateNetwork = false;
|
||||||
|
};
|
||||||
|
environment = env;
|
||||||
|
};
|
||||||
|
|
||||||
# Reading the user-provided password file requires root access
|
# Reading the user-provided password file requires root access
|
||||||
systemd.services.paperless-copy-password = mkIf (cfg.passwordFile != null) {
|
systemd.services.paperless-copy-password = mkIf (cfg.passwordFile != null) {
|
||||||
requiredBy = [ "paperless-scheduler.service" ];
|
requiredBy = [ "paperless-scheduler.service" ];
|
||||||
@ -301,7 +311,7 @@ in
|
|||||||
};
|
};
|
||||||
# Allow the web interface to access the private /tmp directory of the server.
|
# Allow the web interface to access the private /tmp directory of the server.
|
||||||
# This is required to support uploading files via the web interface.
|
# This is required to support uploading files via the web interface.
|
||||||
unitConfig.JoinsNamespaceOf = "paperless-scheduler.service";
|
unitConfig.JoinsNamespaceOf = "paperless-task-queue.service";
|
||||||
# Bind to `paperless-scheduler` so that the web server never runs
|
# Bind to `paperless-scheduler` so that the web server never runs
|
||||||
# during migrations
|
# during migrations
|
||||||
bindsTo = [ "paperless-scheduler.service" ];
|
bindsTo = [ "paperless-scheduler.service" ];
|
||||||
|
@ -200,6 +200,9 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
|
|||||||
makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \
|
makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \
|
||||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||||
--prefix PATH : "${path}"
|
--prefix PATH : "${path}"
|
||||||
|
makeWrapper ${python.pkgs.celery}/bin/celery $out/bin/celery \
|
||||||
|
--prefix PYTHONPATH : "$PYTHONPATH:$out/lib/paperless-ngx/src" \
|
||||||
|
--prefix PATH : "${path}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = with python.pkgs.pythonPackages; [
|
checkInputs = with python.pkgs.pythonPackages; [
|
||||||
|
Loading…
Reference in New Issue
Block a user