Sat, 20 Jan 2018 14:04:51 +0000
Also listen to stdout
# # Borgend scheduler # from Queue import Queue import sched import ui class Scheduler: def __init__(self, backups): self.backups=backups self.eventqueue=Queue() self.t=Thread(target=self.__scheduler) t.start() def __scheduler(sched): timeout=??? q=sched.eventqueue while True: timeout, timerevent=next_timed_event(sched); t=Timer(timeout, lambda: q.put(timerevent)); event=sq.get(True): # Decide what to do