Fix sleep on creating tasks

pull/54/head
Filipe Santos 7 years ago
parent d27ee19f3b
commit 7e1dd2f2d9

@ -737,8 +737,8 @@ def run(add_delay=2.5, sort='votes', no_search=False, run_now=False, no_notifica
if run_now: if run_now:
movie_schedule.run() movie_schedule.run()
# Sleep between tasks # Sleep between tasks
time.sleep(add_delay) time.sleep(add_delay)
if cfg.automatic.shows.interval: if cfg.automatic.shows.interval:
shows_schedule = schedule.every(cfg.automatic.shows.interval).hours.do( shows_schedule = schedule.every(cfg.automatic.shows.interval).hours.do(
@ -752,6 +752,9 @@ def run(add_delay=2.5, sort='votes', no_search=False, run_now=False, no_notifica
if run_now: if run_now:
shows_schedule.run() shows_schedule.run()
# Sleep between tasks
time.sleep(add_delay)
# Enter running schedule # Enter running schedule
while True: while True:
try: try:

Loading…
Cancel
Save