Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tituschewxj committed Oct 22, 2024
1 parent 2ba631b commit c730342
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/matching-service/processes/performmatches.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"log"
"matching-service/databases"
"matching-service/models"
Expand Down Expand Up @@ -77,12 +78,13 @@ func PerformMatching(rdb *redis.Client, matchRequest models.MatchRequest, ctx co
return nil
}, keys...)
if err != nil {
// transaction failed, so will retry
// Handle error (like retry logic could be added here)
// return fmt.Errorf("transaction execution failed: %v", err)
// return
if errors.Is(err, models.ExistingUserError) {
errorChan <- err
break
} else {
// transaction failed, so will retry
println(fmt.Errorf("transaction execution failed: %v", err))
}
}
if err == nil {
Expand Down

0 comments on commit c730342

Please sign in to comment.