diff --git a/db.py b/db.py index 4fd3099..e27ca07 100644 --- a/db.py +++ b/db.py @@ -13,4 +13,8 @@ INJECT_REQUIREMENTS_BY_INJECT_UUID = {} EXERCISES_STATUS = {} PROGRESS = { } -NOTIFICATION_MESSAGES = collections.deque([], 30) \ No newline at end of file +NOTIFICATION_BUFFER_SIZE = 30 +NOTIFICATION_MESSAGES = collections.deque([], NOTIFICATION_BUFFER_SIZE) + +def resetNotificationMessage(): + NOTIFICATION_MESSAGES = collections.deque([], NOTIFICATION_BUFFER_SIZE) \ No newline at end of file diff --git a/notification.py b/notification.py index 6abca94..7c0b34e 100644 --- a/notification.py +++ b/notification.py @@ -21,7 +21,7 @@ def get_notifications() -> list[dict]: def reset_notifications(): - db.NOTIFICATION_MESSAGES = [] + db.resetNotificationMessage() def record_notification(notification: dict):