代码拉取完成,页面将自动刷新
import json
import logging
log = logging.getLogger(__name__)
DEFAULTS_FILENAME = "/code/config/defaults.json"
CONFIG_FILENAME = "/code/config/config.json"
def load_config_files(defaults_filename: str = DEFAULTS_FILENAME, config_filename: str = CONFIG_FILENAME) -> dict:
data = {}
for fname in (defaults_filename, config_filename):
try:
with open(fname) as infil:
data.update(json.load(infil))
except FileNotFoundError:
log.warning(f"Couldn't find {fname}")
if not data:
raise RuntimeError(f"Could not find either {defaults_filename} or {config_filename}")
return data
data = load_config_files()
bind = data["listen_ip"] + ":" + str(data["listen_port"])
workers = data["gunicorn_workers"]
timeout = 3 * 60
keepalive = 24 * 60 * 60
worker_class = "uvicorn.workers.UvicornWorker"
threads = 45
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。