def create_app(self): app = create_app("testing") app.config["LIVESERVER_PORT"] = 5050 app.config["OPEN_DEPLOYMENT"] = 0 return app
size 20M\n\ postrotate\n\ kill -HUP \$(cat /usr/src/app/gunicorn.pid)\n \ endscript}" logrotate = subprocess.run( f"cat > /etc/logrotate.d/cornflow <<EOF\n {conf} \nEOF", shell=True) out_logrotate = logrotate.stdout print(out_logrotate) except error: print(error) # make initdb, access control and/or migrations app = create_app(ENV, CORNFLOW_DB_CONN) with app.app_context(): migrate = Migrate(app=app, db=db) upgrade() access_init_command(0) # create user if auth type is db or oid if AUTH == 1 or AUTH == 0: # create cornflow admin user create_user_with_role( CORNFLOW_ADMIN_USER, CORNFLOW_ADMIN_EMAIL, CORNFLOW_ADMIN_PWD, "admin", ADMIN_ROLE, verbose=1, )
def create_app(self): app = create_app("testing") return app
def create_app(self): app = create_app("testing") app.config["LIVESERVER_PORT"] = 5050 return app
def create_app(self): app = create_app("testing") app.config["OPEN_DEPLOYMENT"] = 0 return app
def setUp(self): super().setUp() self.runner = create_app().test_cli_runner() self.runner.invoke(register_roles, ["-v", 1]) self.AUTH_TYPE = current_app.config["AUTH_TYPE"] self.data = {"username": "******", "password": "******"}
def create_app(self): app = create_app("testing") app.config["SIGNUP_ACTIVATED"] = 0 return app