Пример #1
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()
        app.app_uri = 'lemur:create_app(config="{0}")'.format(kwargs.get('config'))

        return app.run()
Пример #2
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()

        app.app_uri = 'aardvark:create_app()'
        return app.run()
Пример #3
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()
        app.app_uri = 'lemur:create_app(config="{0}")'.format(kwargs.get('config'))

        return app.run()
Пример #4
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()

        # run startup tasks on an app like object
        validate_conf(current_app, REQUIRED_VARIABLES)

        app.app_uri = 'lemur:create_app(config="{0}")'.format(current_app.config.get('CONFIG_PATH'))

        return app.run()
Пример #5
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()

        # run startup tasks on an app like object
        validate_conf(current_app, REQUIRED_VARIABLES)

        app.app_uri = 'lemur:create_app(config="{0}")'.format(current_app.config.get('CONFIG_PATH'))

        return app.run()
Пример #6
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()

        # run startup tasks on a app like object
        pre_app = create_app(kwargs.get('config'))
        validate_conf(pre_app, REQUIRED_VARIABLES)

        app.app_uri = 'lemur:create_app(config="{0}")'.format(
            kwargs.get('config'))

        return app.run()
Пример #7
0
    def run(self, *args, **kwargs):
        from gunicorn.app.wsgiapp import WSGIApplication

        app = WSGIApplication()

        # run startup tasks on an app like object
        validate_conf(current_app, REQUIRED_VARIABLES)

        app.app_uri = 'lemur:create_app(config_path="{0}")'.format(
            current_app.config.get("CONFIG_PATH"))

        log_config_dict = current_app.config.get("LOG_CONFIG_DICT")
        if log_config_dict:
            app.cfg.set("logconfig_dict", log_config_dict)

        return app.run()
Пример #8
0
def deploy():
    """
    Deploy app
    """
    app.config.update(DEBUG=False, TESTING=False)

    try:
        os.mkdir("log")
    except BaseException:
        pass

    for file_name in ["log/error.log", "log/access.log"]:
        if not os.path.exists(file_name):
            os.system("touch " + file_name)

    from gunicorn.app.wsgiapp import WSGIApplication
    guni_app = WSGIApplication()
    guni_app.app_uri = 'dueros:app'

    options = {
        'workers': 4,
        'accesslog': 'log/access.log',
        'errorlog': 'log/error.log',
        'loglevel': 'info',
        'bind': '127.0.0.1:8000',
    }

    config = dict([(key, value) for key, value in iteritems(options)])

    for key, value in iteritems(config):
        guni_app.cfg.set(key, value)

    print(
        "=======================================================================\n"
        "============================ start gunicorn ===========================\n"
        "======================================================================="
    )
    return guni_app.run()
Пример #9
0
 def run(self, *args, **kwargs):
     from gunicorn.app.wsgiapp import WSGIApplication
     app = WSGIApplication()
     app.app_uri = 'manage:app'
     return app.run()
Пример #10
0
 def run(self, *args, **kwargs):
     from gunicorn.app.wsgiapp import WSGIApplication
     app = WSGIApplication()
     app.app_uri = 'manage:app'
     return app.run()
Пример #11
0
def run_app(_args):
    from gunicorn.app.wsgiapp import WSGIApplication
    wsgi_app = WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]")
    wsgi_app.app_uri = 'gam.app:create_app()'
    wsgi_app.cfg.set('reload', True)
    wsgi_app.run()
Пример #12
0
 def start_webserver(self):
     app = WSGIApplication()
     app.app_uri = 'cerberus.webserver:app'
     return app.run()