Releases: hibiken/asynq
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.
v0.19.1
v0.19.0
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
takesOption
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 throughTask.ResultWriter
method.TaskInfo
has new fieldsCompletedAt
,Result
andRetention
.
Removed
Client.SetDefaultOptions
is removed. UseNewTask
instead to pass default options for tasks.