Ensure context propagation in SNS binding (#1825)
Spin-off from PR adding contexts to input bindings Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
This commit is contained in:
parent
a58d8dddda
commit
0cb7906c41
|
@ -107,13 +107,11 @@ func (a *AWSSNS) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bind
|
|||
msg := fmt.Sprintf("%v", payload.Message)
|
||||
subject := fmt.Sprintf("%v", payload.Subject)
|
||||
|
||||
input := &sns.PublishInput{
|
||||
_, err = a.client.PublishWithContext(ctx, &sns.PublishInput{
|
||||
Message: &msg,
|
||||
Subject: &subject,
|
||||
TopicArn: &a.topicARN,
|
||||
}
|
||||
|
||||
_, err = a.client.Publish(input)
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue