예제 #1
0
 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 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
예제 #3
0
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')
예제 #4
0
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')
예제 #5
0
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')