Skip to content

Commit 616233b

Browse files
Linter
1 parent cb05385 commit 616233b

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

dapr/clients/grpc/_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ def metadata(self) -> Dict[str, str]:
333333
"""Gets metadata."""
334334
return self._metadata
335335

336+
336337
class EncryptRequestIterator(DaprRequest):
337338
"""An iterator for cryptography encrypt API requests.
338339

examples/state_store/state_store.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,20 @@
9090

9191
# Outbox pattern
9292
# pass in the ("outbox.projection", "true") metadata to the transaction to enable the outbox pattern.
93-
d.execute_state_transaction(store_name=storeName, operations=[
94-
TransactionalStateOperation(key="key1", data="val1",
95-
metadata={"outbox.projection": "false"}),
96-
TransactionalStateOperation(key="key1", data="val2",
97-
metadata={"outbox.projection": "true"}), ], )
98-
print("Transaction with outbox pattern executed successfully!")
99-
100-
val = d.get_state(store_name=storeName, key="key1").data
93+
d.execute_state_transaction(
94+
store_name=storeName,
95+
operations=[
96+
TransactionalStateOperation(
97+
key='key1', data='val1', metadata={'outbox.projection': 'false'}
98+
),
99+
TransactionalStateOperation(
100+
key='key1', data='val2', metadata={'outbox.projection': 'true'}
101+
),
102+
],
103+
)
104+
print('Transaction with outbox pattern executed successfully!')
105+
106+
val = d.get_state(store_name=storeName, key='key1').data
101107
print(f'Got value after outbox pattern: {val}')
102108

103109
# Transaction delete

0 commit comments

Comments
 (0)