mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 21:50:28 +08:00 
			
		
		
		
	在缓存任务键值中增加集群信息,以便于调试问题
This commit is contained in:
		@@ -99,11 +99,24 @@ func (this *TaskAction) readTask(taskId int64) (ok bool) {
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// 集群信息
 | 
			
		||||
		var clusterMap = maps.Map{
 | 
			
		||||
			"id":   0,
 | 
			
		||||
			"name": "",
 | 
			
		||||
		}
 | 
			
		||||
		if key.NodeCluster != nil {
 | 
			
		||||
			clusterMap = maps.Map{
 | 
			
		||||
				"id":   key.NodeCluster.Id,
 | 
			
		||||
				"name": key.NodeCluster.Name,
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		keyMaps = append(keyMaps, maps.Map{
 | 
			
		||||
			"key":     key.Key,
 | 
			
		||||
			"isDone":  key.IsDone,
 | 
			
		||||
			"isDoing": key.IsDoing,
 | 
			
		||||
			"errors":  errorMaps,
 | 
			
		||||
			"cluster": clusterMap,
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user