mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-31 18:10:50 +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:
@@ -252,6 +252,8 @@ func (svc *MasterService) setWorkerNodeOnline(node *models.Node) {
|
||||
return
|
||||
}
|
||||
|
||||
svc.Infof("[TIMING] Starting setWorkerNodeOnline for node[%s]", node.Key)
|
||||
|
||||
oldStatus := node.Status
|
||||
node.Status = constants.NodeStatusOnline
|
||||
node.Active = true
|
||||
@@ -264,6 +266,8 @@ func (svc *MasterService) setWorkerNodeOnline(node *models.Node) {
|
||||
return
|
||||
}
|
||||
|
||||
svc.Infof("[TIMING] Completed database update for node[%s] - Active=%v, Enabled=%v, Status=%s",
|
||||
node.Key, node.Active, node.Enabled, node.Status)
|
||||
svc.Infof("worker node[%s] status changed from '%s' to 'online'", node.Key, oldStatus)
|
||||
|
||||
// send notification if status changed
|
||||
|
||||
Reference in New Issue
Block a user