diff options
author | Valery Piashchynski <[email protected]> | 2021-07-23 08:35:18 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-23 08:35:18 +0300 |
commit | c851b5611a4118b714a05873225916ae07cf4e4a (patch) | |
tree | 204f078f78401de2ee88951b2665399c92d6403b /plugins/jobs/drivers/sqs/item.go | |
parent | 54a5c4f2766927427431fd9960c7936dccadeaba (diff) |
SQS configuration and tests update
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/sqs/item.go')
-rw-r--r-- | plugins/jobs/drivers/sqs/item.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/jobs/drivers/sqs/item.go b/plugins/jobs/drivers/sqs/item.go index 9b052fbc..325c4781 100644 --- a/plugins/jobs/drivers/sqs/item.go +++ b/plugins/jobs/drivers/sqs/item.go @@ -20,7 +20,7 @@ const ( ApproximateReceiveCount string = "ApproximateReceiveCount" ) -var attributes = []string{ +var itemAttributes = []string{ job.RRJob, job.RRDelay, job.RRTimeout, @@ -194,9 +194,9 @@ func unpack(msg *types.Message, queue *string, client *sqs.Client) (*Item, error return nil, errors.E(op, errors.Str("failed to unpack the ApproximateReceiveCount attribute")) } - for i := 0; i < len(attributes); i++ { - if _, ok := msg.MessageAttributes[attributes[i]]; !ok { - return nil, errors.E(op, errors.Errorf("missing queue attribute: %s", attributes[i])) + for i := 0; i < len(itemAttributes); i++ { + if _, ok := msg.MessageAttributes[itemAttributes[i]]; !ok { + return nil, errors.E(op, errors.Errorf("missing queue attribute: %s", itemAttributes[i])) } } |