Avg Release Cycle
57 days ago
Beta version for v0.10 includes the following API changes:
(*Client).EnqueueAthas changed to return a
Resultstruct contains metadata about task that was enqueued (e.g. ID, Queue, etc).
ErrorHandlersignature has changed to
func(context.Context, *Task, error). Please use
GetMaxRetry(ctx)to get the count values that was part of the argument list in the previous versions.
Beta version for v0.10 includes the following semantics changes:
- 0️⃣ All tasks now require timeout or deadline. By default, timeout is set to 1800 seconds(i.e. 30 mins) if none of them are specified.
- Tasks that exceed its deadline are automatically retried. In the previous versions, User provided
Handlerneeded to explicitly return an error when
ctx.Donechannel is closed. In the new version, this is taken care of by the library. In order to avoid processing tasks when its deadline is exceeded,
Handlershould always check
ctx.Donechannel and stop processing when the channel is closed.
Other important changes:
- ⬆️ Please upgrade to the new version of asynq CLI which is compatible with the new version of the library.
- ✅ Encoding schema for messages has changed. Please install the latest CLI and run
migratecommand if you have tasks enqueued with the previous version of asynq.
- 👀 The
unpausecommands were added to the CLI. See README for the CLI for details.
- 👀 The
GetMaxRetryfunctions were added to extract task metadata from context.
Loggerinterface has changed. Please see the godoc for the new interface.
LogLeveltype is added. Server's log level can be specified through
Closemethod is added to
ParseRedisURIhelper function is added to create a
RedisConnOptfrom a URI string.
SetDefaultOptionsmethod is added to
Backgroundtype is renamed to
- ⚡️ To upgrade from the previous version, Update
- CLI is renamed to
- ⬆️ To upgrade the CLI to the latest version run
go get -u github.com/hibiken/tools/asynq
pscommand in CLI is renamed to
Concurrencydefaults to the number of CPUs when unset or set to a negative value.
ShutdownTimeoutfield is added to
Configto speicfy timeout duration used during graceful shutdown.
- 🆕 New
Quietas well as