generalise /reload

このコミットが含まれているのは:
n9k 2021-07-17 01:01:28 +00:00
コミット 7fd97d32f1
1個のファイルの変更5行の追加4行の削除

ファイルの表示

@ -390,10 +390,11 @@ def reload():
'''
Re-read config.toml
'''
with open(CONFIG_FILE) as fp:
config = toml.load(fp)
CONFIG['captcha']['fonts'] = config['captcha']['fonts']
CONFIG['stream']['hls_time'] = config['stream']['hls_time']
with viewership.lock:
with open(CONFIG_FILE) as fp:
config = toml.load(fp)
for key in config:
CONFIG[key] = config[key]
# this exists for the same reason as in /debug
response = make_response(CONFIG)