DNS更新任务增加域名更新

This commit is contained in:
刘祥超
2021-01-28 15:39:02 +08:00
parent fdb6b1a6bc
commit 779052d2d8

View File

@@ -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)
} }