From 20d3d9b6c85104598c7ec36edb19e56cfdb33ca2 Mon Sep 17 00:00:00 2001 From: clore Date: Thu, 12 Sep 2024 01:05:33 +0000 Subject: [PATCH] add hive bin paths --- lib/hive_miner_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hive_miner_interface.py b/lib/hive_miner_interface.py index df6972e..32e361e 100644 --- a/lib/hive_miner_interface.py +++ b/lib/hive_miner_interface.py @@ -55,7 +55,7 @@ async def get_session_start_time(pid): return None async def get_miner_stats(miner_dir, api_timeout=15): - stdout, stderr, code = await async_run_bash_command(f'export API_TIMEOUT={api_timeout}'+''' && read -t $((API_TIMEOUT + 5)) -d "" pid khs stats < <(function run_miner_scripts { echo "$BASHPID"; cd '''+miner_dir+''' || exit; source h-manifest.conf; source h-config.sh; source h-stats.sh; printf "%q\n" "$khs"; echo "$stats"; }; run_miner_scripts) && [[ $? -ge 128 ]] && [[ ! -z "$pid" && "$pid" -ne $$ ]] && kill -9 "$pid" 2>/dev/null ; echo $stats''') + stdout, stderr, code = await async_run_bash_command(f'export PATH=$PATH:/hive/sbin:/hive/bin && export API_TIMEOUT={api_timeout}'+''' && read -t $((API_TIMEOUT + 5)) -d "" pid khs stats < <(function run_miner_scripts { echo "$BASHPID"; cd '''+miner_dir+''' || exit; source h-manifest.conf; source h-config.sh; source h-stats.sh; printf "%q\n" "$khs"; echo "$stats"; }; run_miner_scripts) && [[ $? -ge 128 ]] && [[ ! -z "$pid" && "$pid" -ne $$ ]] && kill -9 "$pid" 2>/dev/null ; echo $stats''') try: if stdout and not stderr and code == 0: stats = json.loads(stdout)