Skip to content

Commit

Permalink
Pass args to job.
Browse files Browse the repository at this point in the history
Solves issue #7 on the main repo.
  • Loading branch information
ukchukx committed Sep 10, 2019
1 parent 0c67956 commit d8a48e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions timeloop/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ def _stop_jobs(self):

def job(self, interval):
def decorator(f):
self._add_job(f, interval)
return f
def wrapper(*args, **kwargs):
self._add_job(f, interval, *args, **kwargs)
return f
return wrapper

return decorator

def stop(self):
Expand Down

0 comments on commit d8a48e0

Please sign in to comment.