not main thread

This commit is contained in:
Kseninia Mikhaylova 2024-07-16 17:16:19 +03:00
parent 8204f47e72
commit 8d52302c7e
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class TgbotConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "tgbot"
def ready(self):
if not TgBotUpdater.is_run and os.environ.get("RUN_MAIN", None) == "true":
if not TgBotUpdater.is_run and os.environ.get("RUN_MAIN", None) != "true":
threading.Thread(
target=(TgBotUpdater().run_func),
name="tg_updater_thread",