Skip to content

Commit cd445df

Browse files
author
Daniel Jimenez
committed
Set SQS visibility TO to 5min
1 parent c26b21f commit cd445df

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: cmd/vulnerability-db-consumer/config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ type dbConfig struct {
3939
}
4040

4141
type sqsConfig struct {
42-
NProcessors uint8 `toml:"number_of_processors"`
43-
WaitTime uint8 `toml:"wait_time"`
44-
Timeout uint8
42+
NProcessors uint `toml:"number_of_processors"`
43+
WaitTime uint `toml:"wait_time"`
44+
Timeout uint
4545
QueueARN string `toml:"queue_arn"`
4646
Endpoint string `toml:"endpoint"`
4747
}

Diff for: config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name = "$PG_NAME"
1717
[sqs]
1818
number_of_processors = $SQS_NUMBER_OF_PROCESSORS
1919
wait_time = 20
20-
timeout = 30
20+
timeout = 300
2121
queue_arn = "$SQS_QUEUE_ARN"
2222
endpoint = "$AWS_SQS_ENDPOINT"
2323

Diff for: pkg/queue/sqs.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type awsData struct {
5353
}
5454

5555
// NewSQSConsumerGroup creates a new SQSConsumerGroup.
56-
func NewSQSConsumerGroup(nConsumers uint8, config SQSConfig, processor Processor, logger *log.Logger) (*SQSConsumerGroup, error) {
56+
func NewSQSConsumerGroup(nConsumers uint, config SQSConfig, processor Processor, logger *log.Logger) (*SQSConsumerGroup, error) {
5757
var consumerGroup SQSConsumerGroup
5858

5959
awsSess, err := session.NewSession()
@@ -64,7 +64,7 @@ func NewSQSConsumerGroup(nConsumers uint8, config SQSConfig, processor Processor
6464
awsData := parseQueueARN(config.QueueArn)
6565

6666
var consumers []*SQSConsumer
67-
for i := uint8(0); i < nConsumers; i++ {
67+
for i := uint(0); i < nConsumers; i++ {
6868
c, err := newSQSConsumer(awsSess, awsData, config, processor, logger)
6969
if err != nil {
7070
return nil, err

0 commit comments

Comments
 (0)