mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[PR #174] [MERGED] Automatic recovery of orphan tasks #2670
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#2670
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/174
Author: @hibiken
Created: 6/22/2020
Status: ✅ Merged
Merged: 6/29/2020
Merged by: @hibiken
Base:
next← Head:enhance/fault-tolerance📝 Commits (10+)
825b29bAdd redis key for deadlines in base package7fddba8Change TaskMessage Timeout and Deadline to int9d471e3Use default timeout of 30mins if both timeout and deadline are not5587601Add task message to deadlines set on dequeued98fc7cUpdate RDB.Dequeue to return message and deadlinecf3ccdfUpdate RDB.Done to remove message from deadlines setee31ea2Update RDB.Retry to remove message from deadlines setc1a3584Update RDB.Kill to remove message from deadlines setd334a66Update RDB.Dequeue to return deadline as time.Time889e801Update RDB.Requeue to remove message from deadlines set📊 Changes
20 files changed (+1348 additions, -358 deletions)
View changed files
📝
CHANGELOG.md(+7 -0)📝
client.go(+41 -5)📝
client_test.go(+48 -33)📝
context.go(+3 -14)📝
context_test.go(+40 -49)📝
internal/asynqtest/asynqtest.go(+33 -5)📝
internal/base/base.go(+14 -21)📝
internal/base/base_test.go(+16 -19)📝
internal/rdb/rdb.go(+132 -56)📝
internal/rdb/rdb_test.go(+399 -85)📝
internal/testbroker/testbroker.go(+14 -2)📝
processor.go(+66 -48)📝
processor_test.go(+4 -17)➕
recoverer.go(+96 -0)➕
recoverer_test.go(+162 -0)📝
server.go(+10 -0)📝
syncer.go(+6 -2)📝
syncer_test.go(+42 -2)➕
tools/asynq/cmd/migrate.go(+214 -0)📝
tools/go.mod(+1 -0)📄 Description
Currently when server crashes while processing tasks, the tasks get stuck in in-progress queue forever.
This PR introduces recovery mechanism for such cases.
Changes:
TODO:
migratecommand to migrate all tasks enqueued with previous version to smooth the version upgrade🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.