def before_start(self, actor): # pragma nocover '''Daemonise the system if required. ''' actor.start_coverage() cfg = actor.cfg self._install_signals(actor) if cfg.reload: assert not cfg.daemon, "Autoreload not compatible with daemon mode" autoreload.start()
def before_start(self, actor): # pragma nocover '''Daemonise the system if required. ''' cfg = actor.cfg if cfg.reload: if autoreload.start(): return if cfg.daemon: system.daemonize(keep_fds=logger_fds()) actor.logger.info('Successfully daemonized process') if not cfg.pidfile: pidfile = 'pulsar.pid' actor.logger.info('Setting pid file to %s', pidfile) cfg.set('pidfile', pidfile) actor.start_coverage() self._install_signals(actor)
def before_start(self, actor): # pragma nocover actor.start_coverage() self._install_signals(actor) if actor.cfg.reload and self.is_arbiter(): autoreload.start()