From f3f1114bc6785831d72056826757c70016adedf2 Mon Sep 17 00:00:00 2001 From: dettlaff Date: Thu, 18 Jul 2024 20:40:18 +0400 Subject: [PATCH] fix: add migration to migration list --- selfprivacy_api/migrations/__init__.py | 2 ++ selfprivacy_api/migrations/add_prometheus.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/migrations/__init__.py b/selfprivacy_api/migrations/__init__.py index 2a2cbaa..6812fb0 100644 --- a/selfprivacy_api/migrations/__init__.py +++ b/selfprivacy_api/migrations/__init__.py @@ -14,10 +14,12 @@ from selfprivacy_api.migrations.write_token_to_redis import WriteTokenToRedis from selfprivacy_api.migrations.check_for_system_rebuild_jobs import ( CheckForSystemRebuildJobs, ) +from selfprivacy_api.add_prometheus import AddPrometheus migrations = [ WriteTokenToRedis(), CheckForSystemRebuildJobs(), + AddPrometheus(), ] diff --git a/selfprivacy_api/migrations/add_prometheus.py b/selfprivacy_api/migrations/add_prometheus.py index 52fa705..93089ff 100644 --- a/selfprivacy_api/migrations/add_prometheus.py +++ b/selfprivacy_api/migrations/add_prometheus.py @@ -25,9 +25,9 @@ class AddPrometheus(Migration): def migrate(self) -> None: with FlakeServiceManager() as manager: if "prometheus" not in manager.services: - manager.services["prometheus"] = ( - "git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/prometheus" - ) + manager.services[ + "prometheus" + ] = "git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/prometheus" with WriteUserData() as data: if "prometheus" not in data["modules"]: data["modules"]["prometheus"] = {