mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #487] How to implement custom panic recovery #222
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#222
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?
Originally created by @mahdimehrabi on GitHub (Jun 12, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/487
Hi , this package able to Automatic recovery of tasks in the event of a worker crash and that's ok but I want to implement custom panic recovery to store panic and error logs in my sentry account.
are we able to set custom logger for asynq or are we able to implement our custom recovery for asynq or asynq have a custom hook when panic happens or ...
@linhbkhn95 commented on GitHub (Jun 15, 2022):
@mahdimehrabi Sound's good. It is useful for many situations. So I have a PR https://github.com/hibiken/asynq/pull/491 to support this feature.
please @hibiken review help me
many thanks
@linhbkhn95 commented on GitHub (Jun 27, 2022):
@hibiken please review my PR #491 :((
@hibiken commented on GitHub (Jul 2, 2022):
@mahdimehrabi Thank you for opening an issue.
@linhbkhn95 thank you for creating a PR, however, I'd like to discuss the API change here first.
The package provides
ErrorHandlerto let users provide error handling logic. We should leverage this existing API by wrapping the recovered panic in a custom error type (PanicError) or a sentinel error value (ErrPanic)@linhbkhn95 commented on GitHub (Jul 6, 2022):
I see If we use a wrap error to return then the client/user needs to handle this error like a callback function @hibiken
@linhbkhn95 commented on GitHub (Sep 21, 2022):
Thank @hibiken, After brainstorming again I decide to use the ErrorHandler for handling panic errors.
Please review the PR #491
@linhbkhn95 commented on GitHub (Oct 19, 2022):
@hibiken can you review it for me?