mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[PR #79] [MERGED] Make task handler context aware #2608
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#2608
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/79
Author: @hibiken
Created: 2/12/2020
Status: ✅ Merged
Merged: 2/12/2020
Merged by: @hibiken
Base:
next← Head:feature/ctx📝 Commits (4)
52d2a6dChange Handler interface to take context.Context23bf33dSend cancellation signal to all in-progress handlers on shutdown174b940Allow user to specify timeout per task5356fe9Update docs for context and timeout📊 Changes
10 files changed (+122 additions, -28 deletions)
View changed files
📝
README.md(+4 -1)📝
background.go(+6 -5)📝
background_test.go(+2 -1)📝
benchmark_test.go(+4 -3)📝
client.go(+19 -6)📝
client_test.go(+27 -0)📝
doc.go(+1 -1)📝
internal/base/base.go(+6 -0)📝
processor.go(+45 -4)📝
processor_test.go(+8 -7)📄 Description
Change Handler interface to take context as the first argument.
The context can be canceled in two scenarios (will be three in the future):
Handler implementation should check the context to support cancelation.
This closes part of #69
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.