Пример #1
0
def serve():
    """ Starts the application """
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server

    print(INFO + "%s : Starting application ... " % current_time())
    start_server()
Пример #2
0
def start():
    ''' Update the database schema '''
    from handlers import update_db
    update_db()
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting application ...' % current_time())
    start_server()
Пример #3
0
def start():
    ''' Update the database schema '''
    from handlers import update_db
    update_db()

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
Пример #4
0
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        os._exit(1)

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
Пример #5
0
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except:
        logging.fatal("Error: Unable to verify the db schema.  '--setup=prod' or '--setup=dev' can be used to create the database.")
        os._exit(1)

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
Пример #6
0
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            #Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' %
                 (current_time(), options.listen_port))
    start_server()
Пример #7
0
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            #Skipped if alembic record ahead for branch compatibility
            os._exit(1)
        
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
Пример #8
0
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)

    """ Starts the application """
    from handlers import start_server

    if options.setup.startswith("docker"):
        # Would be nice to grab this info from the container in case it is changed
        port = "80:8888"
        listenport = "Docker port mapping " + port
    else:
        listenport = "port " + str(options.listen_port)
    print(INFO + bold + G + "Starting RTB on %s" % listenport)

    result = start_server()
    if result == "restart":
        restart()
Пример #9
0
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    """ Starts the application """
    from handlers import start_server, load_history

    load_history()

    prefix = "https://" if options.ssl else "http://"
    # TODO For docker, it would be nice to grab the mapped docker port
    listenport = C + "%slocalhost:%s" % (prefix, str(options.listen_port)) + W
    sys.stdout.flush()
    try:
        print(INFO + bold + R + "Starting RTB on %s" % listenport, flush=True)
    except TypeError:
        print(INFO + bold + R + "Starting RTB on %s" % listenport)
    if len(options.mail_host) > 0 and "localhost" in options.origin:
        logging.warning(
            "%sWARNING:%s Invalid 'origin' configuration (localhost) for Email support %s"
            % (WARN + bold + R, W, WARN))

    result = start_server()
    if result == "restart":
        restart()
Пример #10
0
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    """ Starts the application """
    from handlers import start_server

    prefix = "https://" if options.ssl else "http://"
    # TODO For docker, it would be nice to grab the mapped docker port
    listenport = C + "%slocalhost:%s" % (prefix, str(options.listen_port)) + W
    sys.stdout.flush()
    try:
        print(INFO + bold + R + "Starting RTB on %s" % listenport, flush=True)
    except:
        print(INFO + bold + R + "Starting RTB on %s" % listenport)

    result = start_server()
    if result == "restart":
        restart()
Пример #11
0
def serve(options, *args, **kwargs):
    ''' Starts the application '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server
    print(INFO+'%s : Starting application ...' % current_time())
    start_server()
Пример #12
0
def start():
    ''' Starts the application '''
    from handlers import start_server
    print(INFO + '%s : Starting application ...' % current_time())
    start_server()
Пример #13
0
def serve():
    ''' Starts the application '''
    from handlers import start_server

    print(INFO + '%s : Starting application ...' % current_time())
    start_server()
Пример #14
0
def start():
    ''' Starts the application '''
    from handlers import start_server
    logging.info("Starting application server")
    start_server()
Пример #15
0
def serve():
    ''' Starts the application '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server
    print(INFO + '%s : Starting application ... ' % current_time())
    start_server()
Пример #16
0
def serve():
    """
    serves the application
    ----------------------
    """
    start_server()
def serve():
    """ Starts the application """
    start_server()
def start():
    ''' Starts the application '''
    from handlers import start_server
    logging.info("Starting application server")
    start_server()