Fix bot running signal

This commit is contained in:
2025-11-18 23:02:38 +07:00
parent 68e9b2348c
commit 030a6b0eba
2 changed files with 3 additions and 21 deletions

View File

@@ -234,12 +234,12 @@ public class TradingBotBase : ITradingBot
// Update signals for live trading only // Update signals for live trading only
if (!Config.IsForBacktest) if (!Config.IsForBacktest)
{ {
await LoadLastCandle();
if (!Config.IsForCopyTrading) if (!Config.IsForCopyTrading)
{ {
await UpdateSignals(); await UpdateSignals();
} }
await LoadLastCandle();
} }
if (!Config.IsForWatchingOnly) if (!Config.IsForWatchingOnly)

View File

@@ -35,7 +35,7 @@ interface Web3ProxyHealthDetail {
} }
const HealthChecks: React.FC = () => { const HealthChecks: React.FC = () => {
const {apiUrl, workerUrl} = useApiUrlStore() const {apiUrl} = useApiUrlStore()
// Use TanStack Query for API health check // Use TanStack Query for API health check
const {data: apiHealth, isLoading: isLoadingApi} = useQuery({ 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<HealthCheckResponse>
}
})
// Helper function to prepare table data from health response // Helper function to prepare table data from health response
@@ -252,10 +243,6 @@ const HealthChecks: React.FC = () => {
[candlesHealth] [candlesHealth]
) )
const workerHealthData = React.useMemo(() =>
prepareHealthData('Managing Worker', workerHealth || null),
[workerHealth]
)
// Create service entries with loading states // Create service entries with loading states
const services = [ const services = [
@@ -269,11 +256,6 @@ const HealthChecks: React.FC = () => {
data: candlesHealthData, data: candlesHealthData,
isLoading: isLoadingCandles, isLoading: isLoadingCandles,
}, },
{
name: 'Managing Worker',
data: workerHealthData,
isLoading: isLoadingWorker,
},
] ]
// Get overall status for a service // Get overall status for a service