fix cron testing on localhost

pull/200/head
Aevann 2023-09-06 20:08:24 +03:00
parent 47b75483fa
commit 3acea943f9
1 changed files with 6 additions and 4 deletions

View File

@ -52,7 +52,9 @@ if FEATURES['PING_GROUPS']:
from .groups import *
if IS_LOCALHOST:
from files.helpers.cron import cron_fn
print('Starting cron tasks!', flush=True)
gevent.spawn(cron_fn, True, False)
print('Cron tasks Finished!', flush=True)
from sys import argv
if "cron" not in argv:
from files.helpers.cron import cron_fn
print('Starting cron tasks!', flush=True)
gevent.spawn(cron_fn, True, False)
print('Cron tasks Finished!', flush=True)