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:
hailin 2025-12-21 21:40:04 -08:00
parent 93b623398e
commit 5904f2f84d
2 changed files with 4 additions and 1 deletions

View File

@ -161,7 +161,7 @@ export class BlockchainWalletHandler implements OnModuleInit {
);
} else {
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)`,
);
}

View File

@ -120,6 +120,9 @@ export class WalletRetryTask {
// 跳过已完成的
if (currentStatus === 'completed') {
this.logger.debug(
`[TASK] User ${userId} status is 'completed', skipping`,
);
return;
}