【发布时间】:2020-02-15 14:34:33
【问题描述】:
我设置了一个简单的 azure 函数 cosmos 触发器,如下所示:
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "DbConnectionString",
"databaseName": "mydb",
"collectionName": "mycollection",
"createLeaseCollectionIfNotExists": "true"
}
],
"scriptFile": "../dist/TestCosmosTrigger/index.js"
}
当我运行该函数时出现错误:
函数“Functions.FeedNotifier”的侦听器无法 开始。 Microsoft.Azure.Documents.ChangeFeedProcessor:主机已经 初始化。
我确实尝试在绑定中添加 partitionKey 字段,但无济于事。
【问题讨论】:
标签: node.js typescript azure azure-functions azure-cosmosdb