Skip to content

Commit

Permalink
Fixes state-store-ttl Python example (#2352)
Browse files Browse the repository at this point in the history
* Update state-store-ttl.md

Add comma so the metadata value is a tuple of tuple, otherwise Python collapses it to just being an ordinary tuple.

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update pubsub-raw.md

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Co-authored-by: Mark Fussell <markfussell@gmail.com>
  • Loading branch information
berndverst and msfussell committed Apr 11, 2022
1 parent 158a86a commit 4bc7495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ with DaprClient() as d:
# Create a typed message with content type and body
resp = d.publish_event(
pubsub_name='pubsub',
topic='TOPIC_A',
topic_name='TOPIC_A',
data=json.dumps(req_data),
publish_metadata={'rawPayload': 'true'}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DAPR_STORE_NAME = "statestore"

with DaprClient() as client:
client.save_state(DAPR_STORE_NAME, "order_1", str(orderId), metadata=(
('ttlInSeconds', '120')
('ttlInSeconds', '120'),
))

```
Expand Down Expand Up @@ -83,4 +83,4 @@ See [this guide]({{< ref state_api.md >}}) for a reference on the state API.

- Learn [how to use key value pairs to persist a state]({{< ref howto-get-save-state.md >}})
- List of [state store components]({{< ref supported-state-stores >}})
- Read the [API reference]({{< ref state_api.md >}})
- Read the [API reference]({{< ref state_api.md >}})

0 comments on commit 4bc7495

Please sign in to comment.