Releases: hibiken/asynq
v0.25.1
Upgrades
- Some packages
Added
- Add
HeartbeatIntervaloption to the scheduler (PR: #956) - Add
RedisUniversalClientsupport to periodic task manager (PR: #958) - Add
--insecureflag to CLI dash command (PR: #980) - Add logging for registration errors (PR: #657)
Fixes
- Perf: Use string concat inplace of fmt.Sprintf in hotpath (PR: #962)
- Perf: Init map with size (PR: #673)
- Fix:
SchedulerandPeriodicTaskManagergraceful shutdown (PR: #977) - Fix:
Servergraceful shutdown on UNIX systems (PR: #982)
New Contributors
- @ghosx made their first contribution in #673
- @khash made their first contribution in #657
- @daixijun made their first contribution in #958
- @robinjoseph08 made their first contribution in #980
Full Changelog: v0.25.0...v0.25.1
v0.25.0
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
IsPanicErrorfunction is introduced to support catching of panic errors when processing tasks (PR: #491)JanitorIntervalandJanitorBatchSizeare added as Server options (PR: #715)NewClientFromRedisClientis introduced to allow reusing an existing redis client (PR: #742)TaskCheckIntervalconfig option is added to specify the interval between checks for new tasks to process when all queues are empty (PR: #694)Pingmethod is added to Client, Server and Scheduler (PR: #585)RevokeTaskerror type is introduced to prevent a task from being retried or archived (PR: #882)SentinelUsernameis 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
@masterto go get the latest changes once updated.
New Contributors
- @testwill made their first contribution in #682
- @abezzub made their first contribution in #687
- @dependabot made their first contribution in #615
- @yeqown made their first contribution in #709
- @krhubert made their first contribution in #694
- @0over made their first contribution in #802
- @crazyoptimist made their first contribution in #827
- @mrusme made their first contribution in #843
- @camcui made their first contribution in #860
- @zhenqianz made their first contribution in #715
- @Harrison-Miller made their first contribution in #743
- @pbarnum made their first contribution in #585
- @kanzihuang made their first contribution in #876
- @pior made their first contribution in #868
- @Skwol made their first contribution in #924
- @mboorstin made their first contribution in #918
- @aradwann made their first contribution in #942
Full Changelog: v0.24.1...v0.25.0
v0.24.1
v0.24.0
Added
PreEnqueueFunc,PostEnqueueFuncis added inSchedulerand deprecatedEnqueueErrorHandler(PR: #476)
Changed
- Removed error log when
Schedulerfailed to enqueue a task. UsePostEnqueueFuncto check for errors and task actions if needed. - Changed log level from ERROR to WARNINING when
Schedulerfailed to recordSchedulerEnqueueEvent.
v0.23.0
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
Groupoption is introduced to enqueue task in a group.GroupAggregatorand related types are introduced for task aggregation feature.GroupGracePeriod,GroupMaxSize,GroupMaxDelay, andGroupAggregatorfields are added toConfig.Inspectorhas new methods related to "aggregating tasks".Groupfield is added toTaskInfo.- (CLI):
group lscommand is added - (CLI):
task lssupports listing aggregating tasks via--state=aggregating --group=<GROUP>flags - Enable rediss url parsing support: Thanks to @eleboucher
Fixed
v0.22.1
v0.22.0
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
BaseContextis introduced inConfigto specify callback hook to provide a basecontextfrom whichHandlercontextis derivedIsOrphanedfield is added toTaskInfoto describe a task left in active state with no worker processing it.
Changed
Servernow recovers tasks with an expired lease. Recovered tasks are retried/archived withErrLeaseExpirederror.
v0.21.0
Added
PeriodicTaskManageris added. Prefer using this overScheduleras it has better support for dynamic periodic tasks. See the wiki page for an example of usingPeriodicTaskManager- The
asynq statscommand now supports a--jsonoption, making its output a JSON object - Introduced new configuration for
DelayedTaskCheckInterval. See godoc for more details.
v0.20.0
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/metricsis added. - Tool
tools/metrics_exporterbinary is added. ProcessedTotalandFailedTotalfields were added toQueueInfostruct.