From 030a6b0eba8ec4d893fbe30f4f21a2419e095f9b Mon Sep 17 00:00:00 2001 From: cryptooda Date: Tue, 18 Nov 2025 23:02:38 +0700 Subject: [PATCH] Fix bot running signal --- .../Bots/TradingBotBase.cs | 4 ++-- .../healthchecks/healthChecks.tsx | 20 +------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/Managing.Application/Bots/TradingBotBase.cs b/src/Managing.Application/Bots/TradingBotBase.cs index 187a84cd..c3395de4 100644 --- a/src/Managing.Application/Bots/TradingBotBase.cs +++ b/src/Managing.Application/Bots/TradingBotBase.cs @@ -234,12 +234,12 @@ public class TradingBotBase : ITradingBot // Update signals for live trading only if (!Config.IsForBacktest) { - await LoadLastCandle(); - if (!Config.IsForCopyTrading) { await UpdateSignals(); } + + await LoadLastCandle(); } if (!Config.IsForWatchingOnly) diff --git a/src/Managing.WebApp/src/pages/monitoringPage/healthchecks/healthChecks.tsx b/src/Managing.WebApp/src/pages/monitoringPage/healthchecks/healthChecks.tsx index 7442ce99..06d22d01 100644 --- a/src/Managing.WebApp/src/pages/monitoringPage/healthchecks/healthChecks.tsx +++ b/src/Managing.WebApp/src/pages/monitoringPage/healthchecks/healthChecks.tsx @@ -35,7 +35,7 @@ interface Web3ProxyHealthDetail { } const HealthChecks: React.FC = () => { - const {apiUrl, workerUrl} = useApiUrlStore() + const {apiUrl} = useApiUrlStore() // Use TanStack Query for API health check const {data: apiHealth, isLoading: isLoadingApi} = useQuery({ @@ -57,15 +57,6 @@ const HealthChecks: React.FC = () => { } }) - // Use TanStack Query for Worker health check - const {data: workerHealth, isLoading: isLoadingWorker} = useQuery({ - queryKey: ['health', 'worker'], - queryFn: async () => { - const response = await fetch(`${workerUrl}/health`) - if (!response.ok) throw new Error('Failed to fetch Worker health') - return response.json() as Promise - } - }) // Helper function to prepare table data from health response @@ -252,10 +243,6 @@ const HealthChecks: React.FC = () => { [candlesHealth] ) - const workerHealthData = React.useMemo(() => - prepareHealthData('Managing Worker', workerHealth || null), - [workerHealth] - ) // Create service entries with loading states const services = [ @@ -269,11 +256,6 @@ const HealthChecks: React.FC = () => { data: candlesHealthData, isLoading: isLoadingCandles, }, - { - name: 'Managing Worker', - data: workerHealthData, - isLoading: isLoadingWorker, - }, ] // Get overall status for a service