Exemple #1
0
 def start(self):
     """ The Gamin watch monitor in :attr:`mon` must be created by
     the daemonized process, so is created in ``start()``. Before
     the :class:`Gamin.WatchMonitor` object is created, monitors
     are added to :attr:`add_q`, and are created once the watch
     monitor is created."""
     FileMonitor.start(self)
     self.mon = WatchMonitor()
     for monitor in self.add_q:
         self.AddMonitor(*monitor)
     self.add_q = []
Exemple #2
0
    def __init__(self):
        FileMonitor.__init__(self)

        #: The :class:`Gamin.WatchMonitor` object for this monitor.
        self.mon = None

        #: The counter used to produce monotonically increasing
        #: monitor handle IDs
        self.counter = 0

        #: The queue used to record monitors that are added before
        #: :func:`start` has been called and :attr:`mon` is created.
        self.add_q = []
Exemple #3
0
    def __init__(self, ignore=None, debug=False):
        FileMonitor.__init__(self, ignore=ignore, debug=debug)

        #: The :class:`Gamin.WatchMonitor` object for this monitor.
        self.mon = None

        #: The counter used to produce monotonically increasing
        #: monitor handle IDs
        self.counter = 0

        #: The queue used to record monitors that are added before
        #: :func:`start` has been called and :attr:`mon` is created.
        self.add_q = []
Exemple #4
0
    def __init__(self):
        FileMonitor.__init__(self)

        #: The :class:`Gamin.WatchMonitor` object for this monitor.
        self.mon = None

        #: The counter used to produce monotonically increasing
        #: monitor handle IDs
        self.counter = 0

        #: The queue used to record monitors that are added before
        #: :func:`start` has been called and :attr:`mon` is created.
        self.add_q = []

        self.logger.warning("The Gamin file monitor backend is deprecated. "
                            "Please switch to a supported file monitor.")
Exemple #5
0
 def get_event(self):
     if self.mon.event_pending():
         self.mon.handle_one_event()
     return FileMonitor.get_event(self)
Exemple #6
0
 def pending(self):
     return FileMonitor.pending(self) or self.mon.event_pending()
Exemple #7
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.mon = WatchMonitor()
     self.counter = 0
Exemple #8
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.fm = _fam.open()
     self.users = {}
Exemple #9
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.filemonitor = _fam.open()
     self.users = {}
Exemple #10
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.filemonitor = _fam.open()
     self.users = {}
     LOGGER.warning("The Fam file monitor backend is deprecated. Please "
                    "switch to a supported file monitor.")
Exemple #11
0
 def start(self):
     FileMonitor.start(self)
     self.mon = WatchMonitor()
     for monitor in self.add_q:
         self.AddMonitor(*monitor)
     self.add_q = []
Exemple #12
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.mon = None
     self.counter = 0
     self.add_q = []
Exemple #13
0
 def __init__(self, ignore=None, debug=False):
     FileMonitor.__init__(self, ignore=ignore, debug=debug)
     self.mon = WatchMonitor()
     self.counter = 0