Exemple #1
0
    def __init__(self, application, dsn):
        assert Client is not None, RAVEN_IMPORT_MESSAGE
        self.application = application
        self.client = None

        def postfork_sentry_client():
            self.client = Client( dsn )

        register_postfork_function(postfork_sentry_client)
    def _init_monitor_thread(self, name, target_name=None, target=None, start=False, config=None):
        self.monitor_join_sleep = getattr(config, "monitor_thread_join_timeout", DEFAULT_MONITOR_THREAD_JOIN_TIMEOUT)
        self.monitor_join = self.monitor_join_sleep > 0
        self.monitor_sleeper = Sleeper()
        self.monitor_running = True

        if target is not None:
            assert target_name is None
            monitor_func = target
        else:
            target_name = target_name or "monitor"
            monitor_func = getattr(self, target_name)
        self.sleeper = Sleeper()
        self.monitor_thread = threading.Thread(name=name, target=monitor_func)
        self.monitor_thread.setDaemon(True)
        self._start = start
        register_postfork_function(self.start_monitoring)
Exemple #3
0
 def start(self):
     if not self._active:
         self._active = True
         register_postfork_function(self.thread.start)
Exemple #4
0
 def start(self):
     register_postfork_function(self.observer.start)
 def start(self):
     register_postfork_function(self.observer.start)
Exemple #6
0
 def start(self):
     if not self._active:
         self._active = True
         register_postfork_function(self.thread.start)