@@ -230,37 +230,38 @@ async def _handle__invocation_request(self, req):
230
230
current_task .set_azure_invocation_id (invocation_id )
231
231
232
232
try :
233
- fi : functions .FunctionInfo = self ._functions .get (function_id )
233
+ fi : functions .FunctionInfo = self ._functions .get_function (
234
+ function_id )
234
235
235
- params = {}
236
+ args = {}
236
237
for pb in invoc_request .input_data :
237
- pb_type = fi .input_types [pb .name ]
238
+ pb_type = fi .input_binding_types [pb .name ]
238
239
if bindings .is_trigger_binding (pb_type ):
239
240
trigger_metadata = invoc_request .trigger_metadata
240
241
else :
241
242
trigger_metadata = None
242
- params [pb .name ] = bindings .from_incoming_proto (
243
+ args [pb .name ] = bindings .from_incoming_proto (
243
244
pb_type , pb .data , trigger_metadata )
244
245
245
246
if fi .requires_context :
246
- params ['context' ] = bindings .Context (
247
+ args ['context' ] = bindings .Context (
247
248
fi .name , fi .directory , invocation_id )
248
249
249
- if fi .output_types :
250
- for name in fi .output_types :
251
- params [name ] = bindings .Out ()
250
+ if fi .output_binding_types :
251
+ for name in fi .output_binding_types :
252
+ args [name ] = bindings .Out ()
252
253
253
254
if fi .is_async :
254
- call_result = await fi .func (** params )
255
+ call_result = await fi .func (** args )
255
256
else :
256
257
call_result = await self ._loop .run_in_executor (
257
258
self ._sync_call_tp ,
258
- self .__run_sync_func , invocation_id , fi .func , params )
259
+ self .__run_sync_func , invocation_id , fi .func , args )
259
260
260
261
output_data = []
261
- if fi .output_types :
262
- for out_name , out_type in fi .output_types .items ():
263
- val = params [name ].get ()
262
+ if fi .output_binding_types :
263
+ for out_name , out_type in fi .output_binding_types .items ():
264
+ val = args [name ].get ()
264
265
if val is None :
265
266
# TODO: is the "Out" parameter optional?
266
267
# Can "None" be marshaled into protos.TypedData?
@@ -275,9 +276,9 @@ async def _handle__invocation_request(self, req):
275
276
data = rpc_val ))
276
277
277
278
return_value = None
278
- if fi .return_type is not None :
279
+ if fi .return_binding_type is not None :
279
280
return_value = bindings .to_outgoing_proto (
280
- fi .return_type , call_result )
281
+ fi .return_binding_type , call_result )
281
282
282
283
return protos .StreamingMessage (
283
284
request_id = self .request_id ,
0 commit comments