reformatted file structure and reformatted for phones, as well as fixed web sockets for remote devices

This commit is contained in:
UpstreamData
2022-03-08 11:39:10 -07:00
parent 7ba8044564
commit 43834203a8
20 changed files with 430 additions and 324 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))