fix: improve logging for wallet retry task and idempotent status updates
- Change misleading "unexpected" log to correctly indicate idempotent behavior - Add debug log for completed records being skipped in retry task 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
93b623398e
commit
5904f2f84d
|
|
@ -161,7 +161,7 @@ export class BlockchainWalletHandler implements OnModuleInit {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.logger.log(
|
this.logger.log(
|
||||||
`[STATUS] Status not updated for user: ${userId} (unexpected - completed should always succeed)`,
|
`[STATUS] Status already 'completed' for user: ${userId} (idempotent - event redelivered)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,9 @@ export class WalletRetryTask {
|
||||||
|
|
||||||
// 跳过已完成的
|
// 跳过已完成的
|
||||||
if (currentStatus === 'completed') {
|
if (currentStatus === 'completed') {
|
||||||
|
this.logger.debug(
|
||||||
|
`[TASK] User ${userId} status is 'completed', skipping`,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue