mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user