Skip to content

Commit 082d7ef

Browse files
committed
log bug fix
1 parent ea9b93d commit 082d7ef

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

azure_functions_worker/dispatcher.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -680,17 +680,18 @@ def index_functions(self, function_path: str):
680680
len(indexed_functions))
681681

682682
if indexed_functions:
683-
fx_metadata_results, bindings_logs = (
683+
fx_metadata_results, fx_bindings_logs = (
684684
loader.process_indexed_function(
685685
self._functions,
686686
indexed_functions))
687687

688688
indexed_function_logs: List[str] = []
689+
bindings_info = []
689690
for func in indexed_functions:
690-
bindings_info = []
691+
fx_bindings = fx_bindings_logs.get(func)
691692
for binding in func.get_bindings():
692-
deferred_binding_info = bindings_logs.get(binding.name)\
693-
if bindings_logs.get(binding.name) else ""
693+
deferred_binding_info = fx_bindings.get(binding.name)\
694+
if fx_bindings.get(binding.name) else ""
694695
bindings_info.append((binding.type, binding.name,
695696
deferred_binding_info))
696697

azure_functions_worker/loader.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def build_variable_interval_retry(retry, max_retry_count, retry_strategy):
123123
def process_indexed_function(functions_registry: functions.Registry,
124124
indexed_functions):
125125
fx_metadata_results = []
126-
bindings_logs = {}
126+
fx_bindings_logs = {}
127127
for indexed_function in indexed_functions:
128128
function_info = functions_registry.add_indexed_function(
129129
function=indexed_function)
@@ -149,9 +149,10 @@ def process_indexed_function(functions_registry: functions.Registry,
149149
retry_options=retry_protos,
150150
properties={METADATA_PROPERTIES_WORKER_INDEXED: "True"})
151151

152+
fx_bindings_logs.update({indexed_function: bindings_logs})
152153
fx_metadata_results.append(function_metadata)
153154

154-
return fx_metadata_results, bindings_logs
155+
return fx_metadata_results, fx_bindings_logs
155156

156157

157158
@attach_message_to_exception(

0 commit comments

Comments
 (0)