Skip to content

Commit d8a48e0

Browse files
committed
Pass args to job.
Solves issue #7 on the main repo.
1 parent 0c67956 commit d8a48e0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

timeloop/app.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ def _stop_jobs(self):
4848

4949
def job(self, interval):
5050
def decorator(f):
51-
self._add_job(f, interval)
52-
return f
51+
def wrapper(*args, **kwargs):
52+
self._add_job(f, interval, *args, **kwargs)
53+
return f
54+
return wrapper
55+
5356
return decorator
5457

5558
def stop(self):

0 commit comments

Comments
 (0)