def enable_task_routine(self, task_callback=None): """ Add a timer to trigger tasks consuming. @param task_callback: callback function when this task has been done. """ self.task_callback = task_callback self.task_timer = add_timer_routine(self._task_iterator, 1*1000) self.task_timer.start()
def enable_task_routine(self): self.timer = add_timer_routine(self.task_isr, 20*60*1000) self.timer.start()