Exemplo n.º 1
0
Arquivo: irc.py Projeto: 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)
Exemplo n.º 2
0
Arquivo: irc.py Projeto: 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)
Exemplo n.º 3
0
Arquivo: irc.py Projeto: nslater/saxo
 def instruction_schedule(self, unixtime, command, args):
     command = command.encode("ascii")
     args = common.b64pickle(args)
     scheduler.incoming.put((unixtime, command, args))
Exemplo n.º 4
0
Arquivo: irc.py Projeto: 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)))
Exemplo n.º 5
0
Arquivo: irc.py Projeto: 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)))