Skip to content

Commit

Permalink
Merge pull request #1051 from paulyuk/paulyuk/1.13.5-fixes
Browse files Browse the repository at this point in the history
Fixes Python test failure on Configuration API quickstart
  • Loading branch information
paulyuk authored Jul 9, 2024
2 parents 2b78b3a + f4845e6 commit 915bc3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configuration/python/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pip3 install -r requirements.txt
<!-- STEP
name: Run order-processor service
expected_stdout_lines:
- '== APP == Configuration for orderId2 : value: "102"'
- '== APP == Configuration for orderId2 : 102'
- '== APP == Subscription ID is'
expected_stderr_lines:
output_match_mode: substring
Expand Down
7 changes: 2 additions & 5 deletions configuration/python/sdk/order-processor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# Get config items from the config store
for key in CONFIGURATION_KEYS:
resp = client.get_configuration(store_name=DAPR_CONFIGURATION_STORE, keys=[key], config_metadata={})
print(f"Configuration for {key} : {resp.items[key]}", flush=True)
print(f"Configuration for {key} : {resp.items[key].value}", flush=True)

def handler(id: str, resp: ConfigurationResponse):
for key in resp.items:
print("Configuration update {'"+key+"' : {'value': '"+ resp.items[key].value +"'}}", flush=True)
print(f"Configuration update {key} : {resp.items[key].value}", flush=True)


async def subscribe_config():
Expand All @@ -38,6 +38,3 @@ async def subscribe_config():
print("Error unsubscribing from config updates", flush=True)

asyncio.run(subscribe_config())



0 comments on commit 915bc3e

Please sign in to comment.