diff options
author | Valery Piashchynski <[email protected]> | 2021-08-12 11:28:45 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-12 11:28:45 +0300 |
commit | 4169e8374f581ba2213f8cd1833cc6b9b84438e8 (patch) | |
tree | b1d911fbd0ef5960c0513553d8be94809db8b14b /plugins/jobs/drivers/sqs/consumer.go | |
parent | bf2f7167ae49ecac981c7c18a9b9b496fd0a514c (diff) |
Fix various bugs in the SQS. Implement SQS tests for the
jobs_ok.php/jobs_err.php workers.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/sqs/consumer.go')
-rw-r--r-- | plugins/jobs/drivers/sqs/consumer.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/jobs/drivers/sqs/consumer.go b/plugins/jobs/drivers/sqs/consumer.go index 5d741358..9ce37543 100644 --- a/plugins/jobs/drivers/sqs/consumer.go +++ b/plugins/jobs/drivers/sqs/consumer.go @@ -262,9 +262,11 @@ func (j *JobConsumer) Push(ctx context.Context, jb *job.Job) error { } func (j *JobConsumer) handleItem(ctx context.Context, msg *Item) error { - // The new value for the message's visibility timeout (in seconds). Values range: 0 - // to 43200. Maximum: 12 hours. - _, err := j.client.SendMessage(ctx, msg.pack(j.queueURL)) + d, err := msg.pack(j.queueURL) + if err != nil { + return err + } + _, err = j.client.SendMessage(ctx, d) if err != nil { return err } |