Example #1
0
File: irc.py Project: m481114/saxo
 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)
Example #2
0
File: irc.py Project: zort/saxo
 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)
Example #3
0
File: irc.py Project: nslater/saxo
 def instruction_schedule(self, unixtime, command, args):
     command = command.encode("ascii")
     args = common.b64pickle(args)
     scheduler.incoming.put((unixtime, command, args))
Example #4
0
File: irc.py Project: m481114/saxo
 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)))
Example #5
0
File: irc.py Project: zort/saxo
 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)))