Пример #1
0
    def __init__(self, *args, **keys):
        ServiceBot.__init__(self, *args, **keys)

        self._feeds = taskfarm.TaskFarm(self.feed)
        self._rooms = taskfarm.TaskFarm(self.manage_room)
        self._connections = taskfarm.TaskFarm(self.manage_connection, grace_period=0.0)

        self._last_output = float("-inf")
Пример #2
0
    def __init__(self, bot_state_file=None, **keys):
        bot.ServiceBot.__init__(self, bot_state_file=None, **keys)

        self.rooms = taskfarm.TaskFarm(self.handle_room)
        self.db_dir = bot_state_file
        try:
            os.makedirs(self.db_dir)
        except OSError, ose:
            if errno.EEXIST != ose.errno:
                raise ose
Пример #3
0
 def __init__(self, *args, **keys):
     bot.ServiceBot.__init__(self, *args, **keys)
     self.room_handlers = taskfarm.TaskFarm(self._handle_room)
Пример #4
0
 def __init__(self, *args, **keys):
     _RoomBot.__init__(self, *args, **keys)
     self._augments = taskfarm.TaskFarm(self._handle_augment)
     self.geoip = geoipaugment.GeoIPAugmenter(self.geoip_db)
     print self.geoip
     self.ip_key = "source_ip"
Пример #5
0
    def __init__(self, *args, **keys):
        super(ArchiveBot, self).__init__(*args, **keys)

        self.rooms = taskfarm.TaskFarm(self._handle_room, grace_period=0.0)
        self.archive_dir = _ensure_dir(self.archive_dir)
Пример #6
0
 def __init__(self, **keys):
     bot.ServiceBot.__init__(self, **keys)
     self.rooms = taskfarm.TaskFarm(self.handle_room)
     self.srcs = taskfarm.Counter()