Beispiel #1
0
    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()
Beispiel #2
0
    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()
Beispiel #3
0
    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']
Beispiel #4
0
    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']
Beispiel #5
0
    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 = {}
Beispiel #6
0
    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 = {}
Beispiel #7
0
    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()
Beispiel #8
0
    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()