github hibiken/asynq v0.18.0

latest releases: v0.24.1, v0.24.0, v0.23.0...
2 years ago

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 and Payload is accessed by a method call (previously these were fields on Task).

Server

  • Server API has changed. Renamed Quiet to Stop. Renamed Stop to Shutdown. Note: As a result of this renaming, the behavior of Stop has changed. Please update the existing code to call Shutdown where it used to call Stop.

Scheduler

  • Renamed Stop to Shutdown.

Client

  • Client.Enqueue returns TaskInfo (Previously returned Result struct)

Inspector

  • inspeq package is removed. All types and functions from the package is moved to asynq package.
  • Inspector.RunTaskByKey is replaced with Inspector.RunTask
  • Inspector.DeleteTaskByKey is replaced with Inspector.DeleteTask
  • Inspector.ArchiveTaskByKey is replaced with Inspector.ArchiveTask
  • WorkerInfo field names have changed.
  • Inspector.CancelActiveTask is renamed to Inspector.CancelProcessing
  • Inspector List methods (e.g. ListActiveTasks) returns slice of TaskInfo

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)

Don't miss a new asynq release

NewReleases is sending notifications on new releases.