Skip to content

Commit

Permalink
清理代码
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Jan 18, 2023
1 parent ea89186 commit 04f741d
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions internal/workhub/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,17 @@ func Register(c *gin.Context) {

// 注册节点

osType := c.Query("OSType")
hostId := c.Query("HostId")
hostName := c.Query("HostName")

userId := c.GetUint("UserId")

worker := &Worker{
pod,
userId,
osType,
hostId,
hostName,
c.GetUint("UserId"),
c.Query("OSType"),
c.Query("HostId"),
c.Query("HostName"),
&psutil.SystemStat{},
}

nodePool[hostId] = worker
defer delete(nodePool, hostId)
nodePool[worker.HostId] = worker
defer delete(nodePool, worker.HostId)

// 启动服务

Expand Down

0 comments on commit 04f741d

Please sign in to comment.