mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[PR #181] [MERGED] v0.10.0 #655
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#655
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hibiken/asynq/pull/181
Author: @hibiken
Created: 7/6/2020
Status: ✅ Merged
Merged: 7/6/2020
Merged by: @hibiken
Base:
master← Head:next📝 Commits (10+)
f01c7b8Add redis key for deadlines in base package0e70a14Change TaskMessage Timeout and Deadline to int68e6b37Use default timeout of 30mins if both timeout and deadline are not5afb486Add task message to deadlines set on dequeue4ea5805Update RDB.Dequeue to return message and deadlinebee784cUpdate RDB.Done to remove message from deadlines set02b653dUpdate RDB.Retry to remove message from deadlines set08ac779Update RDB.Kill to remove message from deadlines set7433b94Update RDB.Dequeue to return deadline as time.Time88d94a2Update RDB.Requeue to remove message from deadlines set📊 Changes
32 files changed (+1675 additions, -508 deletions)
View changed files
📝
CHANGELOG.md(+10 -0)📝
README.md(+9 -4)📝
benchmark_test.go(+9 -9)📝
client.go(+88 -14)📝
client_test.go(+179 -54)📝
context.go(+3 -14)📝
context_test.go(+41 -50)📝
doc.go(+2 -2)📝
go.mod(+1 -1)📝
go.sum(+7 -15)📝
heartbeat.go(+2 -2)📝
internal/asynqtest/asynqtest.go(+35 -7)📝
internal/base/base.go(+19 -23)📝
internal/base/base_test.go(+18 -21)📝
internal/rdb/inspect.go(+14 -14)📝
internal/rdb/inspect_test.go(+13 -13)📝
internal/rdb/rdb.go(+132 -56)📝
internal/rdb/rdb_test.go(+403 -89)📝
internal/testbroker/testbroker.go(+14 -2)📝
processor.go(+81 -54)...and 12 more files
📄 Description
Added Features
Version 0.10.0 includes the following API changes:
(*Client).Enqueue,(*Client).EnqueueIn, and(*Client).EnqueueAthas changed to return a*Resultand error. A Result struct contains metadata about task that was enqueued (e.g. ID, Queue, etc).ErrorHandlersignature has changed tofunc(context.Context, *Task, error).Version 0.10.0 includes the following semantics changes:
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 when ctx.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 check ctx.Done channel and stop processing when the channel is closed.
Other important changes:
Encoding schema for messages has changed. Install the latest CLI and run migrate command if you have tasks enqueued with the previous version of asynq.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.