def instruction_periodic(self, name, period, cmd, arg, sender=None): database_filename = os.path.join(self.base, "database.sqlite3") with sqlite.Database(database_filename) as db: p = (name, period, int(time.time()), b"scheduled", common.b64pickle((cmd, arg, sender))) # TODO: This fails silently if there's a type error? db["saxo_periodic"].replace(p)
def instruction_periodic(self, name, period, cmd, arg, sender=None): database_filename = os.path.join(self.base, "database.sqlite3") with sqlite.Database(database_filename) as db: p = (name, period, int(time.time()), b"scheduled", common.b64pickle((cmd, arg, sender))) # TODO: This fails silently if there's a type error? db["saxo_periodic"].replace(p)
def instruction_schedule(self, unixtime, command, args): command = command.encode("ascii") args = common.b64pickle(args) scheduler.incoming.put((unixtime, command, args))
def instruction_schedule(self, unixtime, command, args): command = command.encode("ascii") args = common.b64pickle(args) # TODO: Why not just add it to the database ourselves? scheduler.incoming.put(("schedule.add", (unixtime, command, args)))
def instruction_schedule(self, unixtime, command, args): command = command.encode("ascii") args = common.b64pickle(args) # TODO: Why not just add it to the database ourselves? scheduler.incoming.put(("schedule.add", (unixtime, command, args)))