refactored files and folders

This commit is contained in:
UpstreamData
2022-01-06 14:48:11 -07:00
parent e0505a31ca
commit 1f3ffe96a1
4 changed files with 2 additions and 3 deletions

21
settings/__init__.py Normal file
View File

@@ -0,0 +1,21 @@
import toml
import os
try:
with open(os.path.join(os.getcwd(), "settings.toml"), "r") as settings_file:
settings = toml.loads(settings_file.read())
NETWORK_PING_RETRIES: int = settings["ping_retries"]
NETWORK_PING_TIMEOUT: int = settings["ping_timeout"]
NETWORK_SCAN_THREADS: int = settings["scan_threads"]
CFG_UTIL_CONFIG_THREADS: int = settings["config_threads"]
MINER_FACTORY_GET_VERSION_RETRIES: int = settings["get_version_retries"]
except:
NETWORK_PING_RETRIES: int = 3
NETWORK_PING_TIMEOUT: int = 5
NETWORK_SCAN_THREADS: int = 300
CFG_UTIL_CONFIG_THREADS: int = 300
MINER_FACTORY_GET_VERSION_RETRIES: int = 3

5
settings/settings.toml Normal file
View File

@@ -0,0 +1,5 @@
get_version_retries = 3
ping_retries = 3
ping_timeout = 5
scan_threads = 300
config_threads = 300