12345678910111213141516171819202122232425262728293031323334 |
- import handleManager
- def support(event):
- return True
- def handle(faas__request_wrap):
- def log(msg):
- log_content = faas__request_wrap.setdefault('log', [])
- log_content.append("{}/n".format(msg))
- # 取出参数和输入上下文
- params = faas__request_wrap[handleManager.const_key_params]
- context = faas__request_wrap[handleManager.const_key_context]
- # log("函数调用参数:\n{}".format(params))
- # log("函数运行上下文环境变量:\n{}".format(context))
- #--------------------------------------------------------------------
- # 这里添加函数处理逻辑
- #--------------------------------------------------------------------
- context['newKey'] = "I am a new Key!"
- # --------------------------------------------------------------------
- #
- # --------------------------------------------------------------------
- result = {}
- return result
|