Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"execute func every period"
@abc.abstractmethod
def execute_at(self, when, func):
"execute func at when"
@abc.abstractmethod
def execute_after(self, delay, func):
"execute func after delay"
@abc.abstractmethod
def run_pending(self):
"invoke the functions that are due"
class DefaultScheduler(schedule.InvokeScheduler, IScheduler):
def execute_every(self, period, func):
self.add(schedule.PeriodicCommand.after(period, func))
def execute_at(self, when, func):
self.add(schedule.DelayedCommand.at_time(when, func))
def execute_after(self, delay, func):
self.add(schedule.DelayedCommand.after(delay, func))