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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
def start(): ''' Starts the application ''' from handlers import start_server print(INFO + '%s : Starting application ...' % current_time()) start_server()
def serve(): ''' Starts the application ''' from handlers import start_server print(INFO + '%s : Starting application ...' % current_time()) start_server()
def start(): ''' Starts the application ''' from handlers import start_server logging.info("Starting application server") start_server()
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()
def serve(): """ serves the application ---------------------- """ start_server()
def serve(): """ Starts the application """ start_server()