worker: Server.RequestJob → RequestOSBuildJob

This clarifies what it does, at least until its use is expanded to other
job types.
This commit is contained in:
Lars Karlitski 2020-09-20 19:56:51 +02:00 committed by Tom Gundersen
parent ba6a480e32
commit 44c2144994
2 changed files with 3 additions and 3 deletions

View file

@ -172,7 +172,7 @@ func (s *Server) DeleteArtifacts(id uuid.UUID) error {
return os.RemoveAll(path.Join(s.artifactsDir, id.String()))
}
func (s *Server) RequestJob(ctx context.Context) (uuid.UUID, uuid.UUID, *OSBuildJob, error) {
func (s *Server) RequestOSBuildJob(ctx context.Context) (uuid.UUID, uuid.UUID, *OSBuildJob, error) {
token := uuid.New()
var args OSBuildJob
@ -262,7 +262,7 @@ func (h *apiHandlers) RequestJob(ctx echo.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, "invalid job types")
}
token, jobId, jobArgs, err := h.server.RequestJob(ctx.Request().Context())
token, jobId, jobArgs, err := h.server.RequestOSBuildJob(ctx.Request().Context())
if err != nil {
return err
}