Documentation
¶
Overview ¶
Package asynq provides an Asynq-backed implementation of the task.TaskQueue interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*asynqQueue)
Option configures the Asynq queue.
func WithErrorHandler ¶
func WithErrorHandler(h asynqlib.ErrorHandler) Option
WithErrorHandler sets the error handler for the Asynq server. Called on every non-nil error return from task handlers. Use asynq.GetRetryCount(ctx) and asynq.GetMaxRetry(ctx) inside the handler to detect final failure.
func WithRetryDelayFunc ¶
func WithRetryDelayFunc(f asynqlib.RetryDelayFunc) Option
WithRetryDelayFunc sets a custom retry delay calculator. By default, Asynq uses exponential backoff. Useful for testing with fast retries.
Click to show internal directories.
Click to hide internal directories.