azure - 将预编译的 f# 函数部署到 Azure Functions v2
问题描述
我创建了包含两个函数的 af# 项目。我可以在本地运行这些论文,也可以在运行时运行(或在 VS Code 中func start
使用它开始调试)。F5
这两个函数之一将数据从一个 azure 存储容器复制到另一个,另一个函数从数据库复制一些数据并将其放入 azure 存储容器中。当我在本地运行它时,这一切都很好。现在我想将这些部署到 Azure Functions。我创建了一个资源组,创建了函数应用程序并确保函数应用程序设置表明它是 Azure 函数版本 2。当我尝试通过以下方式部署函数时:
func azure functionapp publish <FUNCTION APP NAME>
代码将上传到 Azure。输出是:
Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Upload completed successfully.
Syncing triggers...
在部署选项下的 Azure 门户中,我看到已触发部署,并查看了我获得的最新部署的详细信息:
周一 09/17 更新子模块。
2017 年 9 月星期一准备部署提交 id '75833a2816'。
周一 09/17 生成部署脚本。查看日志
Mon 09/17 正在运行部署命令... 查看日志
Mon 09/17 正在运行部署后命令...
Mon 09/17 成功同步 2 个有效负载大小为 317 字节的函数触发器。
周一 09/17 部署成功。
这似乎表明已经找到并成功部署了两个功能。但是,这些功能并未在 Function App 下的 Functions 下列出。而且我无法成功地打电话给他们。
是否必须提供一些额外的配置才能将 F# 应用程序作为 Azure Function v2 运行?
解决方案
这是我在 Function App 的日志中看到的内容BokioMLDataExtractorFunctionsTest
:
CopyImagesToBokioAIStorage: Invalid script file name configuration. The 'scriptFile' property is set to a file that does not exist.
CopyOcrToBokioAIStorage: Invalid script file name configuration. The 'scriptFile' property is set to a file that does not exist.
这就是为什么这两个功能没有出现的原因。希望这有助于解决问题?
推荐阅读
- javascript - SuperAgent - 在未经授权时使用新的不记名令牌重试原始请求
- python - Python中的并发图
- python-3.x - 根据特定条件生成带有 ffill 的行 - pandas
- python - 如何访问和过滤具有多个值的字典?
- mysql - Mysql:如果没有更多引用(在几个中),则自动删除行
- python - NameError:名称“pydotplus”未定义
- sql-server - 导出 .dtsx 文件并添加到 Visual Studio 中的新项目
- c++ - 将 XML 命名空间 URI 解析为 Poco DOM C++ 中的属性
- python - 将每行都是列表的数据框拆分为列
- azure-active-directory - Azure SSO(示例代码)在 IIS 中的自定义网站中托管时不起作用