Ejemplo n.º 1
0
  def __init__(self, id, mixer, args):
    self.reader = self.makeReader(args['reader'], args['reader_args'])
    self.interval_secs = int(args['interval'])
    BaseManager.__init__(self, id, mixer)

    # Get initial items
    items = self.reader.getUpdate()
    if items:
      self.mixer.update(self, items)
Ejemplo n.º 2
0
  def __init__(self, id, mixer, args):
    self.reader = self.makeReader(args['reader'], args['reader_args'])
    self.reader_desc = "%s: %s" % (args['reader'], args['reader_args'])
    self.interval_secs = int(args['check_interval'])
    self.summary_secs = int(args['summary_interval'])

    self.day_hist = Histogram("Day of the week", weekday_names)
    self.hour_hist = Histogram("Hour of the day", range(24))
    self.delta_hist = Histogram("Time between updates (min)")

    self.summary_timer = threading.Timer(self.summary_secs, self.summarize)
    self.summary_timer.start()
    self.lastupdate = None
    BaseManager.__init__(self, id, mixer)

    # Get initial items
    items = self.reader.getUpdate()
Ejemplo n.º 3
0
 def __str__(self):
   return "%s<%s>" % (BaseManager.__str__(self), self.reader)