mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 03:00:26 +08:00
DNS更新任务增加域名更新
This commit is contained in:
@@ -89,6 +89,15 @@ func (this *DNSTaskService) FindAllDoingDNSTasks(ctx context.Context, req *pb.Fi
|
|||||||
serverName = "服务[" + fmt.Sprintf("%d", task.ServerId) + "]"
|
serverName = "服务[" + fmt.Sprintf("%d", task.ServerId) + "]"
|
||||||
}
|
}
|
||||||
pbTask.Server = &pb.Server{Id: int64(task.ServerId), Name: serverName}
|
pbTask.Server = &pb.Server{Id: int64(task.ServerId), Name: serverName}
|
||||||
|
case dns.DNSTaskTypeDomainChange:
|
||||||
|
domainName, err := dns.SharedDNSDomainDAO.FindDNSDomainName(tx, int64(task.DomainId))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if len(domainName) == 0 {
|
||||||
|
domainName = "域名[" + fmt.Sprintf("%d", task.DomainId) + "]"
|
||||||
|
}
|
||||||
|
pbTask.DnsDomain = &pb.DNSDomain{Id: int64(task.DomainId), Name: domainName}
|
||||||
}
|
}
|
||||||
pbTasks = append(pbTasks, pbTask)
|
pbTasks = append(pbTasks, pbTask)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user