mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
fix: add migration to migration list
This commit is contained in:
parent
5bb49f2109
commit
f3f1114bc6
|
@ -14,10 +14,12 @@ from selfprivacy_api.migrations.write_token_to_redis import WriteTokenToRedis
|
||||||
from selfprivacy_api.migrations.check_for_system_rebuild_jobs import (
|
from selfprivacy_api.migrations.check_for_system_rebuild_jobs import (
|
||||||
CheckForSystemRebuildJobs,
|
CheckForSystemRebuildJobs,
|
||||||
)
|
)
|
||||||
|
from selfprivacy_api.add_prometheus import AddPrometheus
|
||||||
|
|
||||||
migrations = [
|
migrations = [
|
||||||
WriteTokenToRedis(),
|
WriteTokenToRedis(),
|
||||||
CheckForSystemRebuildJobs(),
|
CheckForSystemRebuildJobs(),
|
||||||
|
AddPrometheus(),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@ class AddPrometheus(Migration):
|
||||||
def migrate(self) -> None:
|
def migrate(self) -> None:
|
||||||
with FlakeServiceManager() as manager:
|
with FlakeServiceManager() as manager:
|
||||||
if "prometheus" not in manager.services:
|
if "prometheus" not in manager.services:
|
||||||
manager.services["prometheus"] = (
|
manager.services[
|
||||||
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/prometheus"
|
"prometheus"
|
||||||
)
|
] = "git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes&dir=sp-modules/prometheus"
|
||||||
with WriteUserData() as data:
|
with WriteUserData() as data:
|
||||||
if "prometheus" not in data["modules"]:
|
if "prometheus" not in data["modules"]:
|
||||||
data["modules"]["prometheus"] = {
|
data["modules"]["prometheus"] = {
|
||||||
|
|
Loading…
Reference in a new issue