Skip to content

Commit

Permalink
added looping functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Ennis committed Oct 1, 2015
1 parent 500d5c7 commit dc1bd88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions librarian/utils/import_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ def check_for_updates(app):
for file in file_list:
args=(archive, file, config)
app.exts.tasks.schedule(add_file, args=args)
app.exts.tasks.schedule(schedule_check, args=(app,), kwargs={'delay': 600})


def schedule_check(app, delay=10):
app.exts.tasks.schedule(check_for_updates, args=(app,), delay=delay)


def daemon(app):
app.exts.tasks.schedule(check_for_updates, args=(app,), delay=10,
periodic=False)
schedule_check(app, delay=15)

0 comments on commit dc1bd88

Please sign in to comment.