using dicts is hard ...
This commit is contained in:
parent
8c9206effe
commit
d757a82d80
@ -20,7 +20,7 @@ class Scheduler:
|
|||||||
|
|
||||||
def run_pending(self):
|
def run_pending(self):
|
||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
for _, job in self.jobs:
|
for job in self.jobs.values():
|
||||||
if job['runat'] <= now:
|
if job['runat'] <= now:
|
||||||
job['runat'] += job['timedelta']
|
job['runat'] += job['timedelta']
|
||||||
job['call'](*job['args'])
|
job['call'](*job['args'])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user