def runApp(config): checkPID(config["pidfile"]) passphrase = app.getPassphrase(config["encrypted"]) app.installReactor(config["reactor"]) config["nodaemon"] = config["nodaemon"] or config["debug"] oldstdout = sys.stdout oldstderr = sys.stderr startLogging(config["logfile"], config["syslog"], config["prefix"], config["nodaemon"]) app.initialLog() application = app.getApplication(config, passphrase) startApplication(config, application) app.runReactorWithLogging(config, oldstdout, oldstderr) removePID(config["pidfile"]) app.reportProfile(config["report-profile"], service.IProcess(application).processName) log.msg("Server Shut Down.")
def runApp(config): passphrase = app.getPassphrase(config['encrypted']) app.installReactor(config['reactor']) application = app.getApplication(config, passphrase) oldstdout = sys.stdout oldstderr = sys.stderr startLogging(config['logfile']) app.initialLog() os.chdir(config['rundir']) service.IService(application).privilegedStartService() app.startApplication(application, not config['no_save']) app.startApplication(internet.TimerService(0.1, lambda:None), 0) app.runReactorWithLogging(config, oldstdout, oldstderr) app.reportProfile(config['report-profile'], service.IProcess(application).processName) log.msg("Server Shut Down.")
def runApp(config): passphrase = app.getPassphrase(config['encrypted']) app.installReactor(config['reactor']) application = app.getApplication(config, passphrase) oldstdout = sys.stdout oldstderr = sys.stderr startLogging(config['logfile']) app.initialLog() os.chdir(config['rundir']) service.IService(application).privilegedStartService() app.startApplication(application, not config['no_save']) app.startApplication(internet.TimerService(0.1, lambda: None), 0) app.runReactorWithLogging(config, oldstdout, oldstderr) app.reportProfile(config['report-profile'], service.IProcess(application).processName) log.msg("Server Shut Down.")
def runApp(config): checkPID(config['pidfile']) passphrase = app.getPassphrase(config['encrypted']) app.installReactor(config['reactor']) config['nodaemon'] = config['nodaemon'] or config['debug'] oldstdout = sys.stdout oldstderr = sys.stderr startLogging(config['logfile'], config['syslog'], config['prefix'], config['nodaemon']) app.initialLog() application = app.getApplication(config, passphrase) startApplication(config, application) app.runReactorWithLogging(config, oldstdout, oldstderr) removePID(config['pidfile']) app.reportProfile(config['report-profile'], service.IProcess(application).processName) log.msg("Server Shut Down.")
def testPassphrase(self): self.assertEqual(app.getPassphrase(0), None)
def testPassphrase(self): self.assertIsNone(app.getPassphrase(0))