worker/server: remove duplicate function

The `ManifestJobStatus` and `ManifestByIdJobStatus` both
had identical functionality. The `ManifestByIdJobStatus`
is not being referenced anywhere in the codebase and so
this function has been removed.
This commit is contained in:
Gianluca Zuccarelli 2022-04-06 17:23:59 +01:00 committed by Tom Gundersen
parent 14b006d480
commit b75cf30a05

View file

@ -243,23 +243,6 @@ func (s *Server) DepsolveJobStatus(id uuid.UUID, result *DepsolveJobResult) (*Jo
return status, deps, nil
}
func (s *Server) ManifestByIdJobStatus(id uuid.UUID, result *ManifestJobByIDResult) (*JobStatus, []uuid.UUID, error) {
jobType, status, deps, err := s.jobStatus(id, result)
if err != nil {
return nil, nil, err
}
if jobType != "manifest-by-id" {
return nil, nil, fmt.Errorf("expected \"koji-init\", found %q job instead", jobType)
}
if result.JobError == nil && result.Error != "" {
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorOldResultCompatible, result.Error)
}
return status, deps, nil
}
func (s *Server) ManifestJobStatus(id uuid.UUID, result *ManifestJobByIDResult) (*JobStatus, []uuid.UUID, error) {
jobType, status, deps, err := s.jobStatus(id, result)
if err != nil {