fixed some bugs with running the web app from docker

This commit is contained in:
UpstreamData
2022-03-09 10:53:26 -07:00
parent b3103ae700
commit bfc5668d24
8 changed files with 10 additions and 16 deletions

View File

@@ -0,0 +1,20 @@
import toml
import os
def get_current_settings():
try:
with open(os.path.join(os.getcwd(), "settings/web_settings.toml"), "r") as settings_file:
settings = toml.loads(settings_file.read())
except:
settings = {
"graph_data_sleep_time": 1,
"miner_data_timeout": 5,
"miner_identify_timeout": 5,
}
return settings
def update_settings(settings):
with open(os.path.join(os.getcwd(), "settings/web_settings.toml"), "w") as settings_file:
settings_file.write(toml.dumps(settings))