Skip to content

Commit

Permalink
Add purge command
Browse files Browse the repository at this point in the history
  • Loading branch information
berejant committed Oct 1, 2024
1 parent 35b5386 commit 8727647
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions RealtimeQueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ func CreateRealtimeQueue(t *testing.T) *RealtimeQueue {

client := sqs.NewFromConfig(awsCfg)

_, err = client.PurgeQueue(context.Background(), &sqs.PurgeQueueInput{
QueueUrl: &config.sqsQueueUrl,
})

if err != nil {
fmt.Printf("PurgeQueue failed: %s\n", err)
} else {
fmt.Printf("Purged success:\n")
}

return &RealtimeQueue{
client: client,
sqsQueueUrl: &config.sqsQueueUrl,
Expand Down

0 comments on commit 8727647

Please sign in to comment.