Skip to content

Releases: hibiken/asynq

v0.25.0

01 Nov 08:26
fd3eb86
Compare
Choose a tag to compare

Upgrades

  • ⚠️ Minumum go version is set to 1.22 (PR: #925)
  • Internal protobuf package is upgraded to address security advisories (PR: #925)
  • Most packages are upgraded
  • CI/CD spec upgraded

Added

  • IsPanicError function is introduced to support catching of panic errors when processing tasks (PR: #491)
  • JanitorInterval and JanitorBatchSize are added as Server options (PR: #715)
  • NewClientFromRedisClient is introduced to allow reusing an existing redis client (PR: #742)
  • TaskCheckInterval config option is added to specify the interval between checks for new tasks to process when all queues are empty (PR: #694)
  • Ping method is added to Client, Server and Scheduler (PR: #585)
  • RevokeTask error type is introduced to prevent a task from being retried or archived (PR: #882)
  • SentinelUsername is added as a redis config option (PR: #924)
  • Some jitter is introduced to improve latency when fetching jobs in the processor (PR: #868)
  • Add task enqueue command to the CLI (PR: #918)
  • Add a map cache (concurrent safe) to keep track of queues that ultimately reduces redis load when enqueuing tasks (PR: #946)

Fixes

  • Archived tasks that are trimmed should now be deleted (PR: #743)
  • Fix lua script when listing task messages with an expired lease (PR: #709)
  • Fix potential context leaks due to cancellation not being called (PR: #926)
  • Misc documentation fixes
  • Misc test fixes

⚠️ Potential issues

  • Some of the lua scripts in this library may not be compatible with Redis Cluster.

⚠️ tools and x

  • Yet to be fully upgraded (to v0.25.0)
  • Use @master to go get the latest changes once updated.

New Contributors

Full Changelog: v0.24.1...v0.25.0

v0.24.1

01 May 13:50
Compare
Choose a tag to compare

Changed

  • Updated package version dependency for go-redis

v0.24.0

02 Jan 22:57
Compare
Choose a tag to compare

Added

  • PreEnqueueFunc, PostEnqueueFunc is added in Scheduler and deprecated EnqueueErrorHandler (PR: #476)

Changed

  • Removed error log when Scheduler failed to enqueue a task. Use PostEnqueueFunc to check for errors and task actions if needed.
  • Changed log level from ERROR to WARNINING when Scheduler failed to record SchedulerEnqueueEvent.

v0.23.0

12 Apr 00:03
Compare
Choose a tag to compare

This version adds Task Aggregation feature and includes a few improvements and fixes.

Task Aggregation

This is a new feature which allows you to enqueue multiple tasks successively, and have them passed to the Handler together rather than individually. The feature allows you to batch multiple successive operations into one, in order to save on costs, optimize caching, or batch notifications, for example. See the Wiki page for details.


Added

  • Group option is introduced to enqueue task in a group.
  • GroupAggregator and related types are introduced for task aggregation feature.
  • GroupGracePeriod, GroupMaxSize, GroupMaxDelay, and GroupAggregator fields are added to Config.
  • Inspector has new methods related to "aggregating tasks".
  • Group field is added to TaskInfo.
  • (CLI): group ls command is added
  • (CLI): task ls supports listing aggregating tasks via --state=aggregating --group=<GROUP> flags
  • Enable rediss url parsing support: Thanks to @eleboucher

Fixed

  • Fixed overflow issue with 32-bit systems (For details, see #426): Thanks to @assimon!

v0.22.1

20 Feb 14:24
Compare
Choose a tag to compare

Fixed

  • Fixed Redis version compatibility: Keep support for redis v4.0+ (See issue #401 for details).

v0.22.0

19 Feb 14:28
Compare
Choose a tag to compare

This version improves worker crash recovery by introducing a concept of worker lease for an active task.
It also adds an optional field to Config to customize the context passed to the Handler.

Important Note:
Since this version changes the logic of crash recovery, update of the library version should be done with a clean restart of the process.
In other words, please make sure that the process running asynq.Server shutdown cleanly before restarting the process with this new version.

Added

  • BaseContext is introduced in Config to specify callback hook to provide a base context from which Handler context is derived
  • IsOrphaned field is added to TaskInfo to describe a task left in active state with no worker processing it.

Changed

  • Server now recovers tasks with an expired lease. Recovered tasks are retried/archived with ErrLeaseExpired error.

v0.21.0

22 Jan 14:20
Compare
Choose a tag to compare

Added

  • PeriodicTaskManager is added. Prefer using this over Scheduler as it has better support for dynamic periodic tasks. See the wiki page for an example of using PeriodicTaskManager
  • The asynq stats command now supports a --json option, making its output a JSON object
  • Introduced new configuration for DelayedTaskCheckInterval. See godoc for more details.

v0.20.0

19 Dec 15:05
Compare
Choose a tag to compare

This release includes changes to support Prometheus integration in the Web UI. The integration is optional, there shouldn't be any changes in performance or behavior of the library in this release.

Added

  • Package x/metrics is added.
  • Tool tools/metrics_exporter binary is added.
  • ProcessedTotal and FailedTotal fields were added to QueueInfo struct.

v0.19.1

12 Dec 14:18
Compare
Choose a tag to compare

This release includes a few additions and one fix.

Added

  • Latency field is added to QueueInfo.
  • EnqueueContext method is added to Client.

Fixed

  • Fixed an error when user pass a duration less than 1s to Unique option

v0.19.0

06 Nov 22:27
Compare
Choose a tag to compare

This release includes an introduction of task retention after successful processing. With Retention option, you can specify how long the task should be retained in the queue as a completed task.

Changed

  • NewTask takes Option as variadic argument
  • Bumped minimum supported go version to 1.14 (i.e. go1.14 or higher is required).

Added

  • Retention option is added to allow user to specify task retention duration after completion.
  • TaskID option is added to allow user to specify task ID.
  • ErrTaskIDConflict sentinel error value is added.
  • ResultWriter type is added and provided through Task.ResultWriter method.
  • TaskInfo has new fields CompletedAt, Result and Retention.

Removed

  • Client.SetDefaultOptions is removed. Use NewTask instead to pass default options for tasks.