hibiken/asynq · info

no tasks are ready for processing

Error message

no tasks are ready for processing

What it means

ErrNoProcessableTask indicates Dequeue found no tasks ready for processing: all queues are empty, paused, or hold only scheduled/archived tasks. It is the normal, expected outcome of an idle broker and is returned by rdb.Dequeue (wrapped in an Operation error).

Solutions

  1. Verify server queue config includes the queues producers enqueue to.
  2. Confirm both server and client point at the same Redis host/DB.
  3. Check whether queues are paused (asynq queue state) and resume them if needed.
  4. Treat this error as normal idleness in the processor loop rather than a failure.

Example fix

// before
msg, err := r.Dequeue(qnames)
if err != nil { return err }
// after
msg, err := r.Dequeue(qnames)
if errors.Is(errors.Unwrap(err), errors.ErrNoProcessableTask) {
    return nil // idle: nothing to process
} else if err != nil {
    return err
}
Defensive patterns

Strategy: fallback

Validate before calling

// Check liveness before dequeue loops:
for _, q := range qnames { insp.Stats(q) /* verify queue reachable */ }

Type guard

func isNoProcessableTask(err error) bool {
    var oe *errors.OpError // internal OpError wrapping
    return errors.Is(err, errors.ErrNoProcessableTask) ||
        strings.Contains(err.Error(), "no tasks are ready for processing")
}

Try / catch

if err := processor.Dequeue(); err != nil {
    if isNoProcessableTask(err) { time.Sleep(pollInterval); continue }
    return err
}

Prevention

When it happens

Trigger: Server processor calling Dequeue across configured queues with nothing pending; all queues paused; every pending task is scheduled for a future ProcessAt time; queue names in server config don't match where tasks were enqueued.

Common situations: Healthy idle systems (expected); server configured with queue names that differ from producer's queue names; producer writing to a different Redis; long scheduling delays making the system look starved.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of hibiken/asynq@d135f1439b (2026-09-07). Data as JSON: /api/errors/b1e31296baa25e1f. Report an issue: GitHub.

Appendix: source

Thrown at internal/errors/errors.go:170

		return Unspecified
	}
	e, ok := err.(*Error)
	if !ok {
		return Unspecified
	}
	if e.Code == Unspecified {
		return CanonicalCode(e.Err)
	}
	return e.Code
}

/******************************************
    Domain Specific Error Types & Values
*******************************************/

var (
	// ErrNoProcessableTask indicates that there are no tasks ready to be processed.
	ErrNoProcessableTask = errors.New("no tasks are ready for processing")

	// ErrDuplicateTask indicates that another task with the same unique key holds the uniqueness lock.
	ErrDuplicateTask = errors.New("task already exists")

	// ErrTaskIdConflict indicates that another task with the same task ID already exist
	ErrTaskIdConflict = errors.New("task id conflicts with another task")
)

// TaskNotFoundError indicates that a task with the given ID does not exist
// in the given queue.
type TaskNotFoundError struct {
	Queue string // queue name
	ID    string // task id
}

func (e *TaskNotFoundError) Error() string {
	return fmt.Sprintf("cannot find task with id=%s in queue %q", e.ID, e.Queue)
}

View on GitHub (pinned to d135f1439b)