Skip to content

Commit

Permalink
Pass keyword args to job.
Browse files Browse the repository at this point in the history
Solves issue sankalpjonn#7 on the main repo.
  • Loading branch information
ukchukx committed Sep 7, 2019
1 parent 0c67956 commit 00423bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions timeloop/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def _stop_jobs(self):
self.logger.info("Stopping job {}".format(j.execute))
j.stop()

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

return decorator

def stop(self):
Expand Down

0 comments on commit 00423bf

Please sign in to comment.