函数“orch_fun”不存在、已禁用或不是 Orchestrator 函数。附加信息:当前未注册任何协调器功能

问题描述 投票:0回答:1

我正在尝试使用 Azure Durable FunctionsPython 创建一个 Async HTTP Api

但是我收到下面提到的错误:

The function 'orchestrator_function' doesn't exist, is disabled,
or is not an orchestrator function. Additional info: No orchestrator functions are currently registered!

我为

orchestrator function
创建了一个目录,并为
activiry function
创建了一个目录。每个目录都有一个
__init__.py
和一个
function.json
文件。

客户端函数是上一级目录/级别,并且正在被应该调用它的管道成功调用。

host.json

{
  "version": "2.0",
  "functionTimeout": "00:30:00",
  "logging": {
        "logLevel": {
          "Function.kati_function_app.User": "Information",
          "Function.health-check": "Error"
        }
    },
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": false,
        "excludedTypes": "Request"
      }
    },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.*, 4.0.0]"
  }
}

项目结构:

     .
├── README.md
├── __init__.py
├── host.json
├── pipeline
│   ├── pipeline.yml
│   └── templates
│       ├── deploy.yml
│       ├── run.yml
│       └── variables.yml
├── requirements.txt
└── some_dir
    ├── __init__.py
    ├── activity_function
    │   ├── __init__.py
    │   ├── function.json
    ├── client_function (empty dir)
    ├── function.json
    ├── orchestrator_function
    │   ├── __init__.py
    │   └── function.json
    ├── settings.ini
    ├── settings_local.ini

在使用 Python v1 时如何/在哪里注册

orchestrator function

python-3.x azure-functions
1个回答
0
投票

我意识到,当

orchestration_function
比基本目录/项目深两层时,它就无法被发现。

这个结构对我有用:

.
├── README.md
├── __init__.py
├── activity_function
│   ├── __init__.py
│   └── function.json
├── client_function
│   ├── __init__.py
│   └── function.json
├── host.json
├── orchestrator_function
│   ├── __init__.py
│   └── function.json
├── pipeline
│   ├── pipeline.yml
│   └── templates
│       ├── deploy.yml
│       ├── run.yml
│       └── variables.yml
├── requirements.txt
└── some_dir
    ├── __init__.py
    └── helper_functions.py

© www.soinside.com 2019 - 2024. All rights reserved.