Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Jan 16, 2024
1 parent eb120d6 commit b8ae30b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,19 @@ func StartProcessor(cfg config.Config, logger log.Logger, processingQueue chan *
response := circle.CheckAttestation(cfg, logger, msg.IrisLookupId)
if response != nil {
if msg.Status == types.Created && response.Status == "pending_confirmations" {
logger.Debug("Attestation is created but still pending confirmations for 0x" + msg.IrisLookupId + ". Retrying...")
msg.Status = types.Pending
msg.Updated = time.Now()
time.Sleep(10 * time.Second)
processingQueue <- msg
continue
} else if response.Status == "pending_confirmations" {
logger.Debug("Attestation is still pending for 0x" + msg.IrisLookupId + ". Retrying...")
time.Sleep(10 * time.Second)
processingQueue <- msg
continue
} else if response.Status == "complete" {
logger.Debug("Attestation is complete for 0x" + msg.IrisLookupId + ". Retrying...")
msg.Status = types.Attested
msg.Attestation = response.Attestation
msg.Updated = time.Now()
Expand Down

0 comments on commit b8ae30b

Please sign in to comment.