Skip to content

Commit

Permalink
Merge pull request #27 from uselagoon/feature/disableapiintegration-e…
Browse files Browse the repository at this point in the history
…nvvar

Adds new environment var
  • Loading branch information
bomoko authored Jul 27, 2023
2 parents 4b7e4c3 + 4b359e5 commit 6804165
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions internal/handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func processingIncomingMessageQueueFactory(h *Messaging) func(mq.Message) {
// Ack to remove from queue
err := message.Ack(false)
if err != nil {
fmt.Errorf("%s", err.Error())
fmt.Printf("Failed to acknowledge message: %s\n", err.Error())
}
}(message)

Expand Down Expand Up @@ -376,7 +376,7 @@ func processingIncomingMessageQueueFactory(h *Messaging) func(mq.Message) {
}
err := message.Reject(false)
if err != nil {
fmt.Errorf("%s", err.Error())
fmt.Printf("Unable to reject payload: %s\n", err.Error())
}
return
}
Expand Down Expand Up @@ -417,12 +417,6 @@ func processingIncomingMessageQueueFactory(h *Messaging) func(mq.Message) {
}
}
}

// Ack to remove from queue
err := message.Ack(false)
if err != nil {
fmt.Errorf("%s", err.Error())
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ func main() {
s3Region = getEnv("S3_FILES_REGION", s3Region)
filterTransformerFile = getEnv("FILTER_TRANSFORMER_FILE", filterTransformerFile)
s3useSSL = getEnvBool("S3_USESSL", s3useSSL)
disableAPIIntegration = getEnvBool("INSIGHTS_DISABLE_API_INTEGRATION", disableAPIIntegration)
disableS3Upload = getEnvBool("INSIGHTS_DISABLE_S3_UPLOAD", disableS3Upload)

// configure the backup handler settings
broker := handler.RabbitBroker{
Expand Down

0 comments on commit 6804165

Please sign in to comment.