changed MinerFactory to a singleton class to ensure clearing its cache is easier and removed creation of independant miner factories for each utility
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import asyncio
|
||||
|
||||
from tools.web_monitor.miner_factory import miner_factory
|
||||
from miners.miner_factory import MinerFactory
|
||||
from tools.web_monitor._settings.func import get_current_settings
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ async def get_miner_data_dashboard(miner_ip):
|
||||
miner_data_timeout = settings["miner_data_timeout"]
|
||||
|
||||
miner_ip = await asyncio.wait_for(
|
||||
miner_factory.get_miner(miner_ip),
|
||||
MinerFactory().get_miner(miner_ip),
|
||||
miner_identify_timeout
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user