File tree Expand file tree Collapse file tree
src/main/java/it/aboutbits/springboot/emailservice/lib/application Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,20 +50,7 @@ void sendEmails() {
5050 var countError = 0 ;
5151 for (var id : candidateIds ) {
5252 Optional <Email > claimed ;
53- try {
54- claimed = manageEmail .tryClaimForSend (id , staleSendingBefore );
55- } catch (Exception e ) {
56- // Claim failed and rolled back: nothing was sent and the row is unchanged, so it stays claimable
57- // Another pod may pick it up in this same pass, or it is retried on a later pass.
58- log .error (
59- JOB_DESCRIPTION + " | Failed to claim email for sending: {}. "
60- + "Nothing was sent and the row is unchanged; it stays claimable and may be picked up "
61- + "by another pod in this cycle or retried on a later pass." ,
62- id ,
63- e
64- );
65- continue ;
66- }
53+ claimed = manageEmail .tryClaimForSend (id , staleSendingBefore );
6754
6855 if (claimed .isEmpty ()) {
6956 // Lost race to another pod; Skip
You can’t perform that action at this time.
0 commit comments