Skip to content

Commit 797534c

Browse files
author
Evan Roman
committed
Rm cmbd from cache
1 parent f695391 commit 797534c

File tree

1 file changed

+7
-7
lines changed
  • azure_functions_worker/bindings

1 file changed

+7
-7
lines changed

azure_functions_worker/bindings/meta.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,19 +300,19 @@ def deferred_bindings_decode(binding: typing.Any,
300300
"""
301301
global deferred_bindings_cache
302302

303+
# Only applies to Event Hub and Service Bus - cannot cache
303304
if datum.type == "collection_model_binding_data":
304-
# Accumulates each model_binding_data content in collection_model_binding_data
305-
content = "".join(str(mbd.content) for mbd in datum.value.model_binding_data)
306-
else:
307-
content = datum.value.content
305+
return binding.decode(datum,
306+
trigger_metadata=metadata,
307+
pytype=pytype)
308308

309309
if deferred_bindings_cache.get((pb.name,
310310
pytype,
311-
content,
311+
datum.value.content,
312312
function_name), None) is not None:
313313
return deferred_bindings_cache.get((pb.name,
314314
pytype,
315-
content,
315+
datum.value.content,
316316
function_name))
317317
else:
318318
deferred_binding_type = binding.decode(datum,
@@ -321,7 +321,7 @@ def deferred_bindings_decode(binding: typing.Any,
321321

322322
deferred_bindings_cache[(pb.name,
323323
pytype,
324-
content,
324+
datum.value.content,
325325
function_name)] = deferred_binding_type
326326
return deferred_binding_type
327327

0 commit comments

Comments
 (0)