| 45 | } |
| 46 | |
| 47 | func (s *imlReleaseService) GetRunningList(ctx context.Context, serviceId ...string) ([]*Release, error) { |
| 48 | w := make(map[string]interface{}) |
| 49 | if len(serviceId) > 0 { |
| 50 | w["service"] = serviceId |
| 51 | } |
| 52 | list, err := s.releaseRuntime.List(ctx, w) |
| 53 | if err != nil { |
| 54 | return nil, err |
| 55 | } |
| 56 | if len(list) == 0 { |
| 57 | return nil, nil |
| 58 | } |
| 59 | commitIds := utils.SliceToSlice(list, func(o *release.Runtime) string { |
| 60 | return o.Release |
| 61 | }) |
| 62 | commits, err := s.releaseStore.List(ctx, map[string]interface{}{ |
| 63 | "uuid": commitIds, |
| 64 | }) |
| 65 | return utils.SliceToSlice(commits, FromEntity), err |
| 66 | } |
| 67 | |
| 68 | func (s *imlReleaseService) GetRunningApiDocCommits(ctx context.Context, serviceIds ...string) ([]string, error) { |
| 69 | w := make(map[string]interface{}) |