diff options
author | Valery Piashchynski <[email protected]> | 2021-08-31 14:59:28 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-31 14:59:28 +0300 |
commit | 31cf040029eb0b26278e4a9948cbc1aba77ed58b (patch) | |
tree | 884dd2991acf12826752632b8321410e7cc923ce /plugins/sqs | |
parent | 2f44878a7eac71d7b81e66246b46c615a95892d7 (diff) |
Naming: service -> plugin
Fix bug with survived workers in the debug mode
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/sqs')
-rw-r--r-- | plugins/sqs/item.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/sqs/item.go b/plugins/sqs/item.go index 4e33e99e..969d8b5b 100644 --- a/plugins/sqs/item.go +++ b/plugins/sqs/item.go @@ -22,6 +22,7 @@ const ( ) var itemAttributes = []string{ + job.RRID, job.RRJob, job.RRDelay, job.RRPriority, @@ -184,6 +185,7 @@ func (i *Item) pack(queue *string) (*sqs.SendMessageInput, error) { QueueUrl: queue, DelaySeconds: int32(i.Options.Delay), MessageAttributes: map[string]types.MessageAttributeValue{ + job.RRID: {DataType: aws.String(StringType), BinaryValue: nil, BinaryListValues: nil, StringListValues: nil, StringValue: aws.String(i.Ident)}, job.RRJob: {DataType: aws.String(StringType), BinaryValue: nil, BinaryListValues: nil, StringListValues: nil, StringValue: aws.String(i.Job)}, job.RRDelay: {DataType: aws.String(StringType), BinaryValue: nil, BinaryListValues: nil, StringListValues: nil, StringValue: aws.String(strconv.Itoa(int(i.Options.Delay)))}, job.RRHeaders: {DataType: aws.String(BinaryType), BinaryValue: data, BinaryListValues: nil, StringListValues: nil, StringValue: nil}, @@ -228,6 +230,7 @@ func (c *consumer) unpack(msg *types.Message) (*Item, error) { item := &Item{ Job: *msg.MessageAttributes[job.RRJob].StringValue, + Ident: *msg.MessageAttributes[job.RRID].StringValue, Payload: *msg.Body, Headers: h, Options: &Options{ |