VSCod的Eventhub触发器设置本地开发

2024-09-24 02:24:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我一整天都在为这件事头疼,但就是不能让我的本地VSCode开发环境用Python worker处理EventHub触发。在

Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.myfunctionname'. Microsoft.Azure.WebJobs.EventHubs: Value cannot be null. Parameter name: receiverConnectionString.

Function 'Functions.myfunctionname' failed indexing and will be disabled. [10/22/2018 1:17:40 AM] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.)

当涉及到这些东西时,文档非常简单,所以我不确定这些事件触发器是否不受支持,或者我只是没有正确设置它。在

这是什么我的local.settings.json看起来像:

{
  "IsEncrypted": false,
  "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "python",
    "AzureWebJobsStorage": "{AzureWebJobsStorage}",
    "EventHub":"Endpoint=sb://privatename.servicebus.windows.net/;SharedAccessKeyName=SharedAccessKey;SharedAccessKey=key here"
  }
}

Tags: andyouyourbuilderetcjobbefunctions