func (a *priorityResolver) Resolve(ctx context.Context, jobSpecs []models.JobSpec) ([]models.JobSpec, error) {
	if err := a.resolvePriorities(jobSpecs); err != nil {
		return nil, errors.Wrap(err, "error occurred while resolving priority")
	}
	return jobSpecs, nil
}
Resolve takes jobSpecs and returns them with resolved priorities
package job
import (
	"context"
	"github.com/odpf/optimus/core/tree"
	"github.com/odpf/optimus/models"
	"github.com/pkg/errors"
)
const (
	MinPriorityWeight = 1
	MaxPriorityWeight = 10000
	PriorityWeightGap = 10
)
var (
	ErrJobSpecNotFound = errors.New("job spec not found")
	ErrPriorityNotFound = errors.New("priority weight not found")
)
type PriorityResolver interface {
	Resolve(context.Context, []models.JobSpec) ([]models.JobSpec, error)
}
type priorityResolver struct {
}
func NewPriorityResolver() *priorityResolver {
	return &priorityResolver{}
}