Esempio n. 1
0
def main():
    parser = optparse.OptionParser()
    parser.add_option("-H", "--host", default=DEFAULT_HOST)
    parser.add_option("-P", "--port", type="int", default=DEFAULT_PORT)

    options, args = parser.parse_args()

    server = wsgi.server(
            (options.host, options.port),
            app,
            traceback_body=True,
            keepalive_timeout=1)

    mon = monitor.Monitor(server, 5, notify_fifo='/tmp/feather-ready')

    mon.serve()
def main():
    parser = optparse.OptionParser()
    parser.add_option("-H", "--host", default=DEFAULT_HOST)
    parser.add_option("-P", "--port", type="int", default=DEFAULT_PORT)
    parser.add_option("-f", "--foreground", action="store_false",
            dest="daemonize")
    parser.add_option("-d", "--daemonize", action="store_true", default=False)

    options, args = parser.parse_args()

    server = wsgi.server(
            (options.host, options.port),
            app,
            traceback_body=True,
            keepalive_timeout=1)

    mon = monitor.Monitor(server, 5, daemonize=options.daemonize)

    mon.serve()