mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-10-23 17:33:30 +08:00
feat: add auto update admin.zip
This commit is contained in:
9
api.go
9
api.go
@@ -181,6 +181,9 @@ func (s *Server) StreamInfo(ctx context.Context, req *pb.StreamSnapRequest) (res
|
||||
func (s *Server) TaskTree(context.Context, *emptypb.Empty) (res *pb.TaskTreeResponse, err error) {
|
||||
var fillData func(m task.ITask) *pb.TaskTreeData
|
||||
fillData = func(m task.ITask) (res *pb.TaskTreeData) {
|
||||
if m == nil {
|
||||
return
|
||||
}
|
||||
t := m.GetTask()
|
||||
res = &pb.TaskTreeData{
|
||||
Id: m.GetTaskID(),
|
||||
@@ -197,7 +200,11 @@ func (s *Server) TaskTree(context.Context, *emptypb.Empty) (res *pb.TaskTreeResp
|
||||
res.Blocked = fillData(blockedTask)
|
||||
}
|
||||
for t := range job.RangeSubTask {
|
||||
res.Children = append(res.Children, fillData(t))
|
||||
child := fillData(t)
|
||||
if child == nil {
|
||||
continue
|
||||
}
|
||||
res.Children = append(res.Children, child)
|
||||
}
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user