gpt4 book ai didi

node.js - Azure 计时器函数 - Microsoft.WindowsAzure.Storage : Settings must be of the form "name=value"

转载 作者:行者123 更新时间:2023-12-03 01:00:43 25 4
gpt4 key购买 nike

我能够创建 http 触发器函数并执行它们,没有问题,但是当我创建计时器函数时,出现以下错误:

函数“Functions.CheckForWinnersOnTimer”的监听器无法启动。 Microsoft.WindowsAzure.Storage:设置必须采用“名称=值”的形式。

当我创建函数时,模板代码没有改变。

module.exports = async function (context, myTimer) {
var timeStamp = new Date().toISOString();

if (myTimer.IsPastDue)
{
context.log('JavaScript is running late!');
}
context.log('JavaScript timer trigger function ran!', timeStamp);
};

这是为什么呢?我感谢任何帮助!

最佳答案

此错误是您所面临的已知错误。

enter image description here

鉴于你的代码没有任何问题,我认为问题应该是由local.settings.json引起的。请注意 AzureWebJobsStorage 值的格式。

如果您使用本地虚拟存储模拟器,则应填写UseDevelopmentStorage=true。如果您选择Azure上的存储帐户,那么您应该到这里复制值并填写AzureWebJobsStorage:

enter image description here

使用本地存储模拟器的 local.settings.json 示例:

{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "node"
}
}

关于node.js - Azure 计时器函数 - Microsoft.WindowsAzure.Storage : Settings must be of the form "name=value",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60820362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com