我正在使用 Python 3.x 编写 Azure 计时器触发器。我已经运行了一个这样的函数。我想我知道该怎么做,从 JS 创建一个,然后删除“index.js”并创建一个 run.py。但这一次,当我运行 python 函数时,总是收到错误消息“没有这样的文件:index.js”。我没有看到该函数和“index.js”文件之间有任何联系。
有什么想法吗?
我们可以直接从 Azure 门户添加 python 函数。如果你想创建Timetrigger功能,那么我们可以改变触发器类型
以下是我创建Python timetrigger函数的详细步骤。
1.创建 Azure 函数应用程序 https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function#create-a-function-app
2.添加python函数
3.将httptrigger更改为timetrigger
a. delete the httptrigger and http output
b. add the time trigger
4.添加测试代码并从Azure门户进行测试。
默认版本是2.7.8。如果你想使用 python 3.x,你可以按照这个tutorial https://github.com/yokawasa/azure-functions-python-samples/blob/master/docs/custom-python-version.md更新 python 版本。
5.更新python版本。
A。安装Azure功能应用程序的扩展
b.添加Handler Mappings条目以便通过FastCGI使用Python3.X
6.从Azure门户进行测试
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)