chore(node): add timing logs and improve node status diagnostics

- master: add TIMING logs in setWorkerNodeOnline to mark start and completed DB update
- handler: log node status for reconnection debugging and include active/enabled values in "node not active or enabled" error
This commit is contained in:
Marvin Zhang
2025-10-20 11:14:55 +08:00
parent 49165b2165
commit 6020fef30b
2 changed files with 9 additions and 1 deletions

View File

@@ -217,9 +217,13 @@ func (svc *Service) processFetchCycle() error {
return fmt.Errorf("failed to get current node: %w", err)
}
// Log node status for debugging reconnection issues
svc.Debugf("[TIMING] Node status check: Active=%v, Enabled=%v, Status=%s",
n.Active, n.Enabled, n.Status)
// skip if node is not active or enabled
if !n.Active || !n.Enabled {
return fmt.Errorf("node not active or enabled")
return fmt.Errorf("node not active or enabled (active=%v, enabled=%v)", n.Active, n.Enabled)
}
// validate if max runners is reached (max runners = 0 means no limit)