fire job on start using scheduler
This commit is contained in:
parent
8f0db93779
commit
fd54f2497f
@ -49,10 +49,9 @@ def _do_fetch():
|
|||||||
fetch(settings=settings, args=args)
|
fetch(settings=settings, args=args)
|
||||||
|
|
||||||
def _start_scheduling():
|
def _start_scheduling():
|
||||||
logger.info("Fetching on start")
|
|
||||||
_do_fetch()
|
|
||||||
logger.info('Setting Scheduler up')
|
logger.info('Setting Scheduler up')
|
||||||
schedule = Scheduler()
|
schedule = Scheduler()
|
||||||
|
schedule.once(dt.timedelta(seconds=5), _do_fetch)
|
||||||
schedule.cyclic(dt.timedelta(seconds=args.check_interval*60), _do_fetch)
|
schedule.cyclic(dt.timedelta(seconds=args.check_interval*60), _do_fetch)
|
||||||
logger.info(schedule)
|
logger.info(schedule)
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user