Skip to content

Commit 2b28476

Browse files
committed
fix
Signed-off-by: laminar <[email protected]>
1 parent 62a772f commit 2b28476

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/functions_framework/context/function_context.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def __init__(self, name="", version="", dapr_triggers=None, http_trigger=None,
3636
def from_json(json_dct):
3737
name = json_dct.get('name')
3838
version = json_dct.get('version')
39-
inputs_list = json_dct.get('inputs')
40-
outputs_list = json_dct.get('outputs')
39+
inputs_map = json_dct.get('inputs')
40+
outputs_map = json_dct.get('outputs')
4141
_dapr_triggers = json_dct.get('triggers', {}).get('dapr', [])
4242
http_trigger = json_dct.get('triggers', {}).get('http', None)
4343
states = json_dct.get('states', {})
@@ -47,16 +47,16 @@ def from_json(json_dct):
4747
port = json_dct.get('port', 0)
4848

4949
inputs = None
50-
if inputs_list:
50+
if inputs_map:
5151
inputs = {}
52-
for k, v in inputs_list.items():
52+
for k, v in inputs_map.items():
5353
input = Component.from_json(v)
5454
inputs[k] = input
5555

5656
outputs = None
57-
if outputs_list:
57+
if outputs_map:
5858
outputs = {}
59-
for k, v in outputs_list.items():
59+
for k, v in outputs_map.items():
6060
output = Component.from_json(v)
6161
outputs[k] = output
6262

src/functions_framework/triggers/dapr_trigger/dapr.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,13 @@ def start(self, context: RuntimeContext, logger=None):
4545
def binding_handler(request: BindingRequest):
4646
rt_ctx = deepcopy(context)
4747
user_ctx = UserContext(runtime_context=rt_ctx, binding_request=request, logger=logger)
48-
logging.basicConfig(level=logging.DEBUG)
49-
logging.info('Received Message : ' + request.text())
5048
self.user_function(user_ctx)
5149

5250
if trigger.component_type.startswith("pubsub"):
5351
@self.app.subscribe(pubsub_name=trigger.name, topic=trigger.topic)
5452
def topic_handler(event: v1.Event):
5553
rt_ctx = deepcopy(context)
5654
user_ctx = UserContext(runtime_context=rt_ctx, topic_event=event, logger=logger)
57-
logging.basicConfig(level=logging.DEBUG)
58-
logging.info('Received Message : ' + event.data.__str__())
5955
self.user_function(user_ctx)
6056

6157
self.app.run(self.port)

0 commit comments

Comments
 (0)