def run(debug, rcon_check): from random import randint from asciiart import print_image, print_title print_image() print_title() config_app(app, DEBUG=debug, RCON_CHECK_SERVER=(not rcon_check), **config) SocketIOServer(('', port), app, resource="socket.io", transports=['websocket', 'xhr-polling'], policy_server=False).serve_forever()
from gevent import monkey monkey.patch_all() import json import asciiart from lobbypy import create_app, config_app with open("/home/dotcloud/environment.json") as f: env = json.load(f) config = { "DATABASE_URI": env["DOTCLOUD_DB_SQL_URL"].replace("pgsql", "postgresql", 1), "REDIS_URI": env["DOTCLOUD_DATA_REDIS_URL"], "SESSION_KEY": env["SESSION_KEY"], "STEAM_API_KEY": env["STEAM_API_KEY"], } asciiart.print_image() asciiart.print_title() app = create_app() config_app(app, **config)