nopaque/daemon/nopaqued.py

24 lines
613 B
Python
Raw Normal View History

2020-06-05 12:42:04 +00:00
from tasks.check_corpora import check_corpora
from tasks.check_jobs import check_jobs
2020-06-05 12:42:04 +00:00
from tasks.notify import notify
2020-06-10 12:18:02 +00:00
from time import sleep
2020-06-05 12:42:04 +00:00
def nopaqued():
check_corpora_thread = check_corpora()
check_jobs_thread = check_jobs()
notify_thread = notify()
2020-06-10 12:18:02 +00:00
2020-06-05 12:42:04 +00:00
while True:
if not check_corpora_thread.is_alive():
check_corpora_thread = check_corpora()
if not check_jobs_thread.is_alive():
check_jobs_thread = check_jobs()
if not notify_thread.is_alive():
notify_thread = notify()
2020-06-10 12:18:02 +00:00
sleep(3)
2020-06-05 12:42:04 +00:00
if __name__ == '__main__':
nopaqued()