def __init__(self, store, passive=False): """Constructor. Saves the given storage backend and prepares the instance data. If "passive" mode is requested, then the monitor will watch the job status but will not write alarms into the store. This could be used, for example, to implement a web interface (which requires a monitor) separately from the active monitor. """ CrabMinutely.__init__(self) self.store = store self.passive = passive self.sched = {} self.status = {} self.status_ready = Event() self.config = {} self.last_start = {} self.timeout = {} self.late_timeout = {} self.miss_timeout = {} self.max_startid = 0 self.max_alarmid = 0 self.max_finishid = 0 self.new_event = Condition() self.num_warning = 0 self.num_error = 0 self.random = Random()
def __init__(self, config, store): """Constructor method. Stores the store object and a CrabSchedule object.""" CrabMinutely.__init__(self) self.store = store self.schedule = CrabSchedule(config['schedule'], config['timezone']) self.keep_days = config['keep_days']
def __init__(self, config, store, notify): """Constructor method. Stores CrabNotify object and daily CrabSchedule object.""" CrabMinutely.__init__(self) self.store = store self.notify = notify self.schedule = CrabSchedule(config['daily'], config['timezone']) self.config = {} self.sched = {}
def __init__(self, store): """Constructor. Saves the given storage backend and prepares the instance data.""" CrabMinutely.__init__(self) self.store = store self.sched = {} self.status = {} self.status_ready = Event() self.config = {} self.last_start = {} self.timeout = {} self.miss_timeout = {} self.max_startid = 0 self.max_alarmid = 0 self.max_finishid = 0 self.new_event = Condition() self.num_warning = 0 self.num_error = 0 self.random = Random()