예제 #1
0
파일: server.py 프로젝트: jcsy521/ydws
def main():
    options.parse_command_line()
    aps = AgpsServer(options.options.conf)
    try:
        logging.info("[AGPS] running on localhost.")
        aps.start()
    except KeyboardInterrupt:
        logging.error("[AGPS] Ctrl-C is pressed.")
    except:
        logging.exception("[AGPS] Exit Exception")
    finally:
        logging.warn("[AGPS] shutdown...")
        aps.stop() 
        logging.warn("[AGPS] stopped. Bye!")
예제 #2
0
def main():
    define("console", default=False, type=bool)
    define("mongo_host", default='localhost')

    parse_command_line()
    fetch_extended(options.mongo_host)