Docker_service/fetch.backend_proto.py

13 lines
369 B
Python
Raw Normal View History

2024-03-10 00:58:06 -03:00
# coding: utf-8
from apscheduler.schedulers.background import BlockingScheduler
from main import main as rutina_principal
import logging
sched = BlockingScheduler()
sched.add_job(rutina_principal, 'interval', seconds=int(os.environ.get('INTERVAL'))) #will do the print_t work for every 30 seconds
if __name__ == '__main__':
init_db(db, engine)
sched.start()