Asynq 0.18 includes major API changes and changes to the tooling (WebUI and CLI).
The inspeq
sub package is removed, and all types and functions from the package are moved to asynq
package.
The upgrade guide is available here
Package API changes
Task
NewTask
function takes array of bytes as payload.- Task
Type
andPayload
is accessed by a method call (previously these were fields onTask
).
Server
Server
API has changed. RenamedQuiet
toStop
. RenamedStop
toShutdown
. Note: As a result of this renaming, the behavior ofStop
has changed. Please update the existing code to callShutdown
where it used to callStop
.
Scheduler
- Renamed
Stop
toShutdown
.
Client
Client.Enqueue
returnsTaskInfo
(Previously returnedResult
struct)
Inspector
inspeq
package is removed. All types and functions from the package is moved toasynq
package.Inspector.RunTaskByKey
is replaced withInspector.RunTask
Inspector.DeleteTaskByKey
is replaced withInspector.DeleteTask
Inspector.ArchiveTaskByKey
is replaced withInspector.ArchiveTask
WorkerInfo
field names have changed.Inspector.CancelActiveTask
is renamed toInspector.CancelProcessing
Inspector
List methods (e.g.ListActiveTasks
) returns slice ofTaskInfo
CLI changes
asynq task delete|run|archive
commands takes take ID as well as the queue name (previously required task key)
For example:
asynq task delete --queue=QUEUE --id=TASK_ID
Web UI (asynqmon) changes
- Payload now shows "non-printable bytes" if the payload bytes are not human readable (e.g. binary format)
Redis
- Requires redis v4.0+ for multiple field/value pair support
- Internal redis keys/values has changed (please see the migration guide)