refactorized alerts to messaging

This commit is contained in:
Adolfo Gómez García 2022-02-08 21:30:00 +01:00
parent 9e5b06e835
commit 02fcff2c94
4 changed files with 2 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -34,7 +34,7 @@ import typing
from django.db import models
from uds.core.alerts import notifier
from uds.core.messaging import notifier
from uds.core.util.singleton import Singleton
from uds.core.workers import initialize
@ -83,6 +83,7 @@ class Notifiers(Singleton):
"""
Loads all notifiers from db.
"""
self.notifiers.clear()
for n in Notifier.objects.filter(enabled=True):
self.notifiers[n.name] = n.getInstance()