worker: don't log job not pending dequeue errors

This happens a lot when requesting a job by ID, which happens for the
manifest jobs.
This commit is contained in:
Sanne Raymaekers 2023-10-02 16:29:15 +02:00 committed by Gianluca Zuccarelli
parent 6e4cade608
commit 64e9f1a2c7

View file

@ -619,7 +619,7 @@ func (s *Server) requestJob(ctx context.Context, arch string, jobTypes []string,
jobId, token, depIDs, jobType, args, err = s.jobs.Dequeue(dequeueCtx, jts, channels)
}
if err != nil {
if err != jobqueue.ErrDequeueTimeout {
if err != jobqueue.ErrDequeueTimeout && err != jobqueue.ErrNotPending {
logrus.Errorf("dequeuing job failed: %v", err)
}
return