예제 #1
0
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.")
예제 #2
0
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.")
예제 #3
0
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.")
예제 #4
0
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.")
예제 #5
0
 def testPassphrase(self):
     self.assertEqual(app.getPassphrase(0), None)
예제 #6
0
 def testPassphrase(self):
     self.assertEqual(app.getPassphrase(0), None)
예제 #7
0
 def testPassphrase(self):
     self.assertIsNone(app.getPassphrase(0))
예제 #8
0
 def testPassphrase(self):
     self.assertIsNone(app.getPassphrase(0))