fix: Fix user-facing SP API metadata

This commit is contained in:
Inex Code 2024-11-27 14:08:26 +03:00
parent d91d8d2fd9
commit e2a0e4fc3d
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View file

@ -54,6 +54,7 @@ in
ExecStart = "${selfprivacy-graphql-api}/bin/app.py";
Restart = "always";
RestartSec = "5";
Slice = "selfprivacy_api.slice";
};
};
systemd.services.selfprivacy-api-worker = {
@ -87,8 +88,13 @@ in
ExecStart = "${pkgs.python312Packages.huey}/bin/huey_consumer.py selfprivacy_api.task_registry.huey";
Restart = "always";
RestartSec = "5";
Slice = "selfprivacy_api.slice";
};
};
systemd.slices."selfprivacy_api.slice" = {
name = "selfprivacy_api.slice";
description = "Slice for SelfPrivacy API services";
};
# One shot systemd service to rebuild NixOS using nixos-rebuild
systemd.services.sp-nixos-rebuild = {
description = "nixos-rebuild switch";

View file

@ -88,7 +88,7 @@ class ServiceManager(Service):
@staticmethod
def get_id() -> str:
"""Return service id."""
return "api"
return "selfprivacy-api"
@staticmethod
def get_display_name() -> str:
@ -98,7 +98,7 @@ class ServiceManager(Service):
@staticmethod
def get_description() -> str:
"""Return service description."""
return "A proto-service for API itself. Currently manages backups of settings."
return "Enables communication between the SelfPrivacy app and the server."
@staticmethod
def get_svg_icon() -> str:
@ -135,7 +135,7 @@ class ServiceManager(Service):
@staticmethod
def get_backup_description() -> str:
return "How did we get here?"
return "General server settings."
@classmethod
def get_status(cls) -> ServiceStatus: