Ejemplo n.º 1
0
 def run(self):
     if config.get('DEBUG_PROFILING_ON'):
         # If config flag is set, get live top-level profiling output on
         # stdout by doing kill -SIGTRAP <sync_process>.
         # This slows things down so you probably don't want to do it
         # normally.
         attach_profiler()
     setproctitle('inbox-sync-{}'.format(self.cpu_id))
     retry_with_logging(self._run_impl, self.log)
Ejemplo n.º 2
0
 def run(self):
     if config.get('DEBUG_PROFILING_ON'):
         # If config flag is set, get live top-level profiling output on
         # stdout by doing kill -SIGTRAP <sync_process>.
         # This slows things down so you probably don't want to do it
         # normally.
         attach_profiler()
     setproctitle('inbox-sync-{}'.format(self.cpu_id))
     retry_with_logging(self._run_impl, self.log)
Ejemplo n.º 3
0
    def run(self):
        if config.get('DEBUG_PROFILING_ON'):
            # If config flag is set, get live top-level profiling output on
            # stdout by doing kill -SIGTRAP <sync_process>.
            # This slows things down so you probably don't want to do it
            # normally.
            attach_profiler()

        if config.get('DEBUG_CONSOLE_ON'):
            # Enable the debugging console if this flag is set. Connect to
            # localhost on port $PID to get access to a REPL
            port = None
            start_port = config.get('DEBUG_START_PORT')
            if start_port:
                port = start_port + self.cpu_id

            gevent.spawn(break_to_interpreter, port=port)

        setproctitle('inbox-sync-{}'.format(self.cpu_id))
        retry_with_logging(self._run_impl, self.log)
Ejemplo n.º 4
0
    def run(self):
        if config.get('DEBUG_PROFILING_ON'):
            # If config flag is set, get live top-level profiling output on
            # stdout by doing kill -SIGTRAP <sync_process>.
            # This slows things down so you probably don't want to do it
            # normally.
            attach_profiler()

        if config.get('DEBUG_CONSOLE_ON'):
            # Enable the debugging console if this flag is set. Connect to
            # localhost on the port shown in the logs to get access to a REPL
            port = None
            start_port = config.get('DEBUG_START_PORT')
            if start_port:
                port = start_port + self.cpu_id

            gevent.spawn(break_to_interpreter, port=port)

        setproctitle('inbox-sync-{}'.format(self.cpu_id))
        retry_with_logging(self._run_impl, self.log)