From 6c6189c2120de902a9dd7d8a3aa4fd241ecddfb9 Mon Sep 17 00:00:00 2001 From: varrialeciro Date: Fri, 28 Jul 2023 17:39:19 +0200 Subject: [PATCH 1/2] Manage notifications as a FIFO list --- core/cat/routes/websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cat/routes/websocket.py b/core/cat/routes/websocket.py index 6cf2cc30..80bf2a49 100644 --- a/core/cat/routes/websocket.py +++ b/core/cat/routes/websocket.py @@ -49,8 +49,8 @@ async def check_notification(): while True: # chat notifications (i.e. finished uploading) if len(ccat.web_socket_notifications) > 0: - notification = ccat.web_socket_notifications[-1] - ccat.web_socket_notifications = ccat.web_socket_notifications[:-1] + # extract from FIFO list websocket notification + notification = ccat.web_socket_notifications.pop(0) await manager.send_personal_message(notification, websocket) await asyncio.sleep(1) # wait for 1 seconds before checking again From 21b7109e2325c5449c192c68d34a59771fb50032 Mon Sep 17 00:00:00 2001 From: varrialeciro Date: Fri, 28 Jul 2023 17:39:42 +0200 Subject: [PATCH 2/2] Addedo installation of avaraged_perceptron_tagger --- core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Dockerfile b/core/Dockerfile index 4ce60040..5b3dfe05 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -20,7 +20,7 @@ RUN curl -sL https://github.com/cheshire-cat-ai/admin-vue/releases/download/Admi WORKDIR /app RUN pip install -U pip && \ pip install --no-cache-dir . &&\ - python3 -c "import nltk; nltk.download('punkt')" &&\ + python3 -c "import nltk; nltk.download('punkt');nltk.download('averaged_perceptron_tagger')" &&\ python3 install_plugin_dependencies.py