From 1dc3da5aa7f055bcd7f5d4fc8d319c72d88d8bdd Mon Sep 17 00:00:00 2001 From: Anonyo Noor <100anonyo@gmail.com> Date: Fri, 28 Jun 2024 18:52:07 +0000 Subject: [PATCH] changed concurrency + removed maintenance warning --- backend/routers/utils.py | 2 +- backend/routers/worker.py | 2 +- frontend/components/Health/Health.jsx | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/routers/utils.py b/backend/routers/utils.py index 54a38a8e..34c38e87 100644 --- a/backend/routers/utils.py +++ b/backend/routers/utils.py @@ -143,7 +143,7 @@ def initialize(): db_empty = True if companies.count_documents({}) == 0 else False search_empty = ( - True if companies_index.get_stats().number_of_documents == 1 else False + True if companies_index.get_stats().number_of_documents <= 1 else False ) backup_path = "./static/backup" diff --git a/backend/routers/worker.py b/backend/routers/worker.py index 6e60f75a..7fbbfd8e 100644 --- a/backend/routers/worker.py +++ b/backend/routers/worker.py @@ -27,7 +27,7 @@ class Config: worker_concurrency = WORKERS - conccurrency = 4 + conccurrency = 1 broker_connection_retry_on_startup = True celery_task_always_eager = False if production_environment else True diff --git a/frontend/components/Health/Health.jsx b/frontend/components/Health/Health.jsx index 7218b302..236ac4c7 100644 --- a/frontend/components/Health/Health.jsx +++ b/frontend/components/Health/Health.jsx @@ -15,12 +15,6 @@ const Health = (props) => { }, 1000); } - useEffect(() => { - toast.warning( - "The server is undergoing maintenance, filers will not work currently." - ); - }); - return (