From ee990aeaec510b1e11b9d5a9f0f3f2bfd6728ecc Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 14 Sep 2023 01:37:52 +0300 Subject: [PATCH] dont run cron in chat worker in localhost --- files/routes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/__init__.py b/files/routes/__init__.py index 7a652fc6d..dc584371a 100644 --- a/files/routes/__init__.py +++ b/files/routes/__init__.py @@ -53,7 +53,7 @@ if FEATURES['PING_GROUPS']: if IS_LOCALHOST: from sys import argv - if "cron" not in argv: + if "cron" not in argv and "load_chat" not in argv: from files.helpers.cron import cron_fn print('Starting cron tasks!', flush=True) gevent.spawn(cron_fn, True, False, False)