diff --git a/internal/workhub/db.go b/internal/workhub/db.go index dacfe3ac..6d067f1f 100644 --- a/internal/workhub/db.go +++ b/internal/workhub/db.go @@ -2,35 +2,9 @@ package workhub import ( "tdp-cloud/helper/json" - "tdp-cloud/internal/dborm/machine" history "tdp-cloud/internal/dborm/task_history" ) -// 主机 - -func createMachine(node *Worker) { - - item := &machine.CreateParam{ - UserId: node.UserId, - VendorId: 0, - HostName: node.HostName, - IpAddress: node.Conn.RemoteAddr().String(), - OSType: node.OSType, - Region: "", - Model: "worker", - CloudId: node.HostId, - CloudMeta: json.ToString(node.SystemStat), - Description: "", - Status: "{}", - } - - machine.Create(item) - -} - -func deleteMachine(node *Worker) { -} - // 任务历史 func createHistory(pod *SendPod, data *ExecPayload) uint { diff --git a/internal/workhub/pool.go b/internal/workhub/pool.go index 992501df..82169785 100644 --- a/internal/workhub/pool.go +++ b/internal/workhub/pool.go @@ -40,9 +40,6 @@ func Register(c *gin.Context) { nodePool[hostId] = worker defer delete(nodePool, hostId) - createMachine(worker) - defer deleteMachine(worker) - // 启动服务 Daemon(worker)