asynq
asynq copied to clipboard
Ineffectual error assignment in processor `perform` defer callback
If I read the code correctly, I think the error assignment in line 427 as well as line 429 are ineffectual as the err
is later reassigned at line 431.
https://github.com/hibiken/asynq/blob/6a7bf2ceff1e920b3e8542635b273c4dcca192ac/processor.go#L426-L433
Am I missing anything here or its potentially a bug? 🤔
Thanks for reporting this. I think you are onto something here, It is definitely reassigned!
Pinging @linhbkhn95 on this.
potentially a bug?
I don't think so. The debug.Stack() message will still be more informative that the ones in the if else block. But good to fix such confusions. Though this change has not been released yet in any case.
Thanks @khun84 for reporting this issue. good catch. It will not make potential bugs. But it makes it confusing. So, I will make a PR to improve it.
I just made PR to fix it https://github.com/hibiken/asynq/pull/758 @kamikazechaser Please review it