Skip to content

Commit

Permalink
Add periodic_task() wrapper for MiniHuey.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Jun 28, 2022
1 parent 66d1f1a commit 390925d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions huey/contrib/mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def _schedule(args=None, kwargs=None, delay=None, eta=None):

return decorator

def periodic_task(self, validate_func):
def decorator(fn):
return self.task(validate_func)(fn)
return decorator

def start(self):
if self._run_t is not None:
raise Exception('Task runner is already running.')
Expand Down

0 comments on commit 390925d

Please sign in to comment.