Adding timeout to transactional batch in comsosdb statestore
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
This commit is contained in:
parent
b2f4f1fe17
commit
097737f6cd
|
@ -400,7 +400,9 @@ func (c *StateStore) Multi(request *state.TransactionalStateRequest) error {
|
||||||
|
|
||||||
c.logger.Debugf("#operations=%d,partitionkey=%s", numOperations, partitionKey)
|
c.logger.Debugf("#operations=%d,partitionkey=%s", numOperations, partitionKey)
|
||||||
|
|
||||||
batchResponse, err := c.client.ExecuteTransactionalBatch(context.Background(), batch, nil)
|
ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)
|
||||||
|
batchResponse, err := c.client.ExecuteTransactionalBatch(ctx, batch, nil)
|
||||||
|
cancel()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue