Changelog History
Page 3
-
v0.14.1 Changes
January 19, 2021๐ Fixed
go.mod
file for CLI
-
v0.14.0 Changes
January 14, 2021IMPORTATNT: Please run
asynq migrate
command to migrate from the previous versions.๐ Changed
- ๐ Renamed
DeadTask
toArchivedTask
. - ๐ Renamed the operation
Kill
toArchive
inInpsector
. - ๐จ Print stack trace when Handler panics.
- Include a file name and a line number in the error message when recovering from a panic.
โ Added
- 0๏ธโฃ
DefaultRetryDelayFunc
is now a public API, which can be used in the customRetryDelayFunc
. SkipRetry
error is added to be used as a return value fromHandler
.Servers
method is added toInspector
CancelActiveTask
method is added toInspector
.- โฑ
ListSchedulerEnqueueEvents
method is added toInspector
. - โฑ
SchedulerEntries
method is added toInspector
. DeleteQueue
method is added toInspector
.
- ๐ Renamed
-
v0.13.1 Changes
November 22, 2020๐ Fixed
- ๐ Fixed shutdown timeout in processor. Shutdown timeout can be configured in
Config.ShutdownTimeout
and defaults to 8s if not specified.
- ๐ Fixed shutdown timeout in processor. Shutdown timeout can be configured in
-
v0.13.0 Changes
October 13, 2020โ Added
- โฑ
Scheduler
type is added to enable periodic tasks. See the godoc for its APIs and wiki for the getting-started guide.
๐ Changed
- ๐ interface
Option
has changed. See the godoc for the new interface. This change would have no impact as long as you are using exported functions (e.g.MaxRetry
,Queue
, etc) to createOption
s.
โ Added
- ๐ฐ
Payload.String() string
method is added - ๐ฐ
Payload.MarshalJSON() ([]byte, error)
method is added
- โฑ
-
v0.12.0 Changes
September 12, 2020๐ Version 0.12.0 adds support for Redis Cluster and includes a number of breaking changes.
IMPORTANT : If you are upgrading from a previous version, please install the latest version of the CLI
go get -u github.com/hibiken/asynq/tools/asynq
and runasynq migrate
command. No process should be writing to Redis while you run the migration command.The semantics of queue have changed
Previously, we called tasks that are ready to be processed "Enqueued tasks", and other tasks that are scheduled to be processed in the future "Scheduled tasks", etc.
We changed the semantics of "Enqueue" slightly; All tasks that client pushes to Redis are Enqueued to a queue. Within a queue, tasks will transition from one state to another.
Possible task states are:Pending
: task is ready to be processed (previously called "Enqueued")Active
: tasks is currently being processed (previously called "InProgress")- โฑ
Scheduled
: task is scheduled to be processed in the future Retry
: task failed to be processed and will be retried again in the futureDead
: task has exhausted all of its retries and stored for manual inspection purpose
These semantics change is reflected in the new
Inspector
API and CLI commands.
๐ Changed
Client
โฑ Use
ProcessIn
orProcessAt
option to schedule a task instead ofEnqueueIn
orEnqueueAt
.Previously v0.12.0 client.EnqueueAt(t, task)
client.Enqueue(task, asynq.ProcessAt(t))
client.EnqueueIn(d, task)
client.Enqueue(task, asynq.ProcessIn(d))
Inspector
All Inspector methods are scoped to a queue, and the methods take
qname (string)
as the first argument.
EnqueuedTask
is renamed toPendingTask
and its corresponding methods.
InProgressTask
is renamed toActiveTask
and its corresponding methods.
โฑ Command "Enqueue" is replaced by the verb "Run" (e.g.EnqueueAllScheduledTasks
-->RunAllScheduledTasks
)CLI
CLI commands are restructured to use subcommands. Commands are organized into a few management commands:
To view details on any command, useasynq help <command> <subcommand>
.asynq stats
asynq queue [ls inspect history rm pause unpause]
asynq task [ls cancel delete kill run delete-all kill-all run-all]
asynq server [ls]
โ Added
RedisConnOpt
RedisClusterClientOpt
is added to connect to Redis Cluster.Username
field is added to allRedisConnOpt
types in order to authenticate connection when Redis ACLs are used.
Client
ProcessIn(d time.Duration) Option
andProcessAt(t time.Time) Option
are added to replaceEnqueueIn
andEnqueueAt
functionality.
Inspector
Queues() ([]string, error)
method is added to get all queue names.ClusterKeySlot(qname string) (int64, error)
method is added to get queue's hash slot in Redis cluster.ClusterNodes(qname string) ([]ClusterNode, error)
method is added to get a list of Redis cluster nodes for the given queue.Close() error
method is added to close connection with redis.
Handler
GetQueueName(ctx context.Context) (string, bool)
helper is added to extract queue name from a context.
-
v0.11.0 Changes
July 28, 2020โ Added
๐
Inspector
type was added to monitor and mutate state of queues and tasks. See the godoc for details.HealthCheckFunc
andHealthCheckInterval
fields were added toConfig
to allow user to specify a callback function to check for broker connection. -
v0.10.0 Changes
July 06, 2020โ Added Features
- ๐ท Automatic recovery of tasks in the event of a worker crash
- โฑ Automatic retry of tasks which exceeded its timeout/deadline
๐ Version 0.10.0 includes the following API changes:
(*Client).Enqueue
,(*Client).EnqueueIn
, and(*Client).EnqueueAt
has changed to return a*Result
and error. A Result struct contains metadata about task that was enqueued (e.g. ID, Queue, etc).ErrorHandler
signature has changed tofunc(context.Context, *Task, error)
.
๐ Version 0.10.0 includes the following semantics changes:
- 0๏ธโฃ All tasks now require timeout or deadline. By default, timeout is set to 1800 seconds(30 mins) if neither of them are specified.
- Tasks that exceed its deadline are automatically retried. In the previous versions, User provided
Handler
needed to explicitly return an error whenctx.Done
channel is closed. In the new version, this is taken care of by the library. In order to avoid processing tasks when its deadline is exceeded,Handler
should always checkctx.Done
channel and stop processing when the channel is closed.
Other important changes:
- โฌ๏ธ Please upgrade to the new version of asynq CLI which is compatible with the new version of the library.
- โ Encoding schema for messages has changed. Please install the latest CLI and run migrate command if you have tasks enqueued with the previous version of asynq.
-
v0.10.0.rc1 Changes
July 04, 2020Beta version for v0.10 includes the following API changes:
(*Client).Enqueue
,(*Client).EnqueueIn
, and(*Client).EnqueueAt
has changed to return a*Result
anderror
. AResult
struct contains metadata about task that was enqueued (e.g. ID, Queue, etc).ErrorHandler
signature has changed tofunc(context.Context, *Task, error)
. Please useGetRetryCount(ctx)
and/orGetMaxRetry(ctx)
to get the count values that was part of the argument list in the previous versions.
Beta version for v0.10 includes the following semantics changes:
- 0๏ธโฃ All tasks now require timeout or deadline. By default, timeout is set to 1800 seconds(i.e. 30 mins) if none of them are specified.
- Tasks that exceed its deadline are automatically retried. In the previous versions, User provided
Handler
needed to explicitly return an error whenctx.Done
channel is closed. In the new version, this is taken care of by the library. In order to avoid processing tasks when its deadline is exceeded,Handler
should always checkctx.Done
channel and stop processing when the channel is closed.
Other important changes:
- โฌ๏ธ Please upgrade to the new version of asynq CLI which is compatible with the new version of the library.
- โ
Encoding schema for messages has changed. Please install the latest CLI and run
migrate
command if you have tasks enqueued with the previous version of asynq.
-
v0.9.4 Changes
June 13, 2020๐ Fixed
- ๐ Fixes issue of same tasks processed by more than one worker (https://github.com/hibiken/asynq/issues/90).
-
v0.9.3 Changes
June 12, 2020๐ Fixed
- ๐ Fixes the JSON number overflow issue (https://github.com/hibiken/asynq/issues/166).