fix: [backend:db] Usage of notification buffer size
This commit is contained in:
parent
ac28be543f
commit
ebbadb0aeb
2 changed files with 6 additions and 2 deletions
6
db.py
6
db.py
|
@ -13,4 +13,8 @@ INJECT_REQUIREMENTS_BY_INJECT_UUID = {}
|
||||||
EXERCISES_STATUS = {}
|
EXERCISES_STATUS = {}
|
||||||
PROGRESS = {
|
PROGRESS = {
|
||||||
}
|
}
|
||||||
NOTIFICATION_MESSAGES = collections.deque([], 30)
|
NOTIFICATION_BUFFER_SIZE = 30
|
||||||
|
NOTIFICATION_MESSAGES = collections.deque([], NOTIFICATION_BUFFER_SIZE)
|
||||||
|
|
||||||
|
def resetNotificationMessage():
|
||||||
|
NOTIFICATION_MESSAGES = collections.deque([], NOTIFICATION_BUFFER_SIZE)
|
|
@ -21,7 +21,7 @@ def get_notifications() -> list[dict]:
|
||||||
|
|
||||||
|
|
||||||
def reset_notifications():
|
def reset_notifications():
|
||||||
db.NOTIFICATION_MESSAGES = []
|
db.resetNotificationMessage()
|
||||||
|
|
||||||
|
|
||||||
def record_notification(notification: dict):
|
def record_notification(notification: dict):
|
||||||
|
|
Loading…
Reference in a new issue