Releases: hibiken/asynq
v0.25.1
Upgrades
- Some packages
Added
- Add
HeartbeatInterval
option to the scheduler (PR: #956) - Add
RedisUniversalClient
support to periodic task manager (PR: #958) - Add
--insecure
flag 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:
Scheduler
andPeriodicTaskManager
graceful shutdown (PR: #977) - Fix:
Server
graceful 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
IsPanicError
function is introduced to support catching of panic errors when processing tasks (PR: #491)JanitorInterval
andJanitorBatchSize
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
- @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
,PostEnqueueFunc
is added inScheduler
and deprecatedEnqueueErrorHandler
(PR: #476)
Changed
- Removed error log when
Scheduler
failed to enqueue a task. UsePostEnqueueFunc
to check for errors and task actions if needed. - Changed log level from ERROR to WARNINING when
Scheduler
failed 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
Group
option is introduced to enqueue task in a group.GroupAggregator
and related types are introduced for task aggregation feature.GroupGracePeriod
,GroupMaxSize
,GroupMaxDelay
, andGroupAggregator
fields are added toConfig
.Inspector
has new methods related to "aggregating tasks".Group
field is added toTaskInfo
.- (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
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
BaseContext
is introduced inConfig
to specify callback hook to provide a basecontext
from whichHandler
context
is derivedIsOrphaned
field is added toTaskInfo
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 withErrLeaseExpired
error.
v0.21.0
Added
PeriodicTaskManager
is added. Prefer using this overScheduler
as it has better support for dynamic periodic tasks. See the wiki page for an example of usingPeriodicTaskManager
- 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
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
andFailedTotal
fields were added toQueueInfo
struct.