-
Notifications
You must be signed in to change notification settings - Fork 107
build: recognize collection_model_binding_data for batch inputs #1655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
733cc4e
07c8a49
2c758e3
b913fec
47ef15a
c5ca0fe
f4d8590
0206ddd
9b88194
5359b17
1274e03
6e5b6ca
ab2a745
f695391
d92ae90
797534c
c4a29d3
83fc793
e991156
6ee6a91
c0235e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,6 +300,15 @@ def deferred_bindings_decode(binding: typing.Any, | |
""" | ||
global deferred_bindings_cache | ||
|
||
# Only applies to Event Hub and Service Bus - cannot cache | ||
# These types will always produce different content and are not clients | ||
if (datum.type == "collection_model_binding_data" | ||
or datum.value.source == "AzureEventHubsEventData" | ||
or datum.value.source == "AzureServiceBusReceivedMessage"): | ||
return binding.decode(datum, | ||
trigger_metadata=metadata, | ||
pytype=pytype) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: Improvement suggestion: validSources = { if datum.type == "collection_model_binding_data" or datum.value.source in valid_sources: Also, can type can be enum in your datum model? That will avoid the string comparisons and improve the codebae as less strings constant will flow. |
||
if deferred_bindings_cache.get((pb.name, | ||
pytype, | ||
datum.value.content, | ||
|
Uh oh!
There was an error while loading. Please reload this page.