def start(self): from userid import id_server from main import settings id_server.A('init', (settings.getIdServerWebPort(), settings.getIdServerTCPPort())) id_server.A('start') return True
def main(): bpio.init() settings.init() lg.set_debug_level(20) reactor.addSystemEventTrigger('before', 'shutdown', A().automat, 'shutdown') reactor.callWhenRunning(A, 'init', (settings.getIdServerWebPort(), settings.getIdServerTCPPort())) reactor.callLater(0, A, 'start') reactor.run() lg.out(2, 'reactor stopped, EXIT')
def main(): bpio.init() settings.init() lg.set_debug_level(20) reactor.addSystemEventTrigger('before', 'shutdown', A().automat, 'shutdown') reactor.callWhenRunning( A, 'init', (settings.getIdServerWebPort(), settings.getIdServerTCPPort())) reactor.callLater(0, A, 'start') reactor.run() lg.out(2, 'reactor stopped, EXIT')
def main(): bpio.init() settings.init() if len(sys.argv) > 1: web_port = int(sys.argv[1]) else: web_port = settings.getIdServerWebPort() if len(sys.argv) > 2: tcp_port = int(sys.argv[2]) else: tcp_port = settings.getIdServerTCPPort() lg.set_debug_level(20) lg.out(2, 'starting ID server ...') reactor.addSystemEventTrigger('before', 'shutdown', A().automat, 'shutdown') reactor.callWhenRunning(A, 'init', (web_port, tcp_port)) reactor.callLater(0, A, 'start') reactor.run() lg.out(2, 'reactor stopped, EXIT')