// List all runners from the database
List all runners from the database
// List all runners from the database
func (s RunnerService) List(ctx context.Context, r api.RunnerListRequest) (*api.RunnerListResponse, error) {
	s.logger.Debug("Getting runners-list")
	var runners []api.Runner
	err := s.DB.Preload("Stages.Process").
		Preload("Stages.SearchAndTag").
		Preload("Stages.Exclude").
		Preload("Stages.Ocr").
		Preload("Stages.Reload").
		Preload("Stages.Populate").
		Preload("Stages.InApp").
		Preload("Stages.SyncDescendants").
		Preload("Stages.ScanNewChildItems").
		Find(&runners).Error
	if err != nil {
		s.logger.Error("Cannot get runners-list", zap.String("exception", err.Error()))
		return nil, err
	}
	s.logger.Debug("Got Runners-list", zap.Int("amount", len(runners)))
	return &api.RunnerListResponse{Runners: runners}, nil
}
func ( s RunnerService ) List ( ctx context . Context , r api . RunnerListRequest ) ( * api . RunnerListResponse , error ) { s . logger . Debug ( " " ) var runners [ ] api . Runner err := s . DB . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Preload ( " " ) . Find ( & runners ) . Error if err != nil { s . logger . Error ( " " , zap . String ( " " , err . Error ( ) ) ) return nil , err } s . logger . Debug ( " " , zap . Int ( " " , len ( runners ) ) ) return & api . RunnerListResponse { Runners : runners } , nil }
List all runners from the database
List all runners from the database