3

enter image description here

On adding a staging slot in my function app, I see the error:

task hub name must be specified in host.json when using slots

I updated host.json as follows:

{
    "version": "2.0",
    "extensions": {
        "durableTask": {
        "hubName": "staging"
        }
    }
}

Should I specify 2 hub names - for production and staging slots?

How do I fix that?

user989988
  • 3,006
  • 7
  • 44
  • 91
  • How would I control which host.json belongs to which slot? I'd like to separate the durable task hub names – baouss May 09 '22 at 11:57

1 Answers1

1

Task hubs can also be configured using app settings

Check documentation here: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-task-hubs?WT.mc_id=Portal-WebsitesExtension&tabs=csharp#task-hub-names

You'd configure the specific value in each slot's settings.

Nirmal Patel
  • 5,128
  • 8
  • 41
  • 52
  • can you elaborate on what that setting is? The Microsoft documentation simply says `When using deployment slots, it's a best practice to configure the task hub name using app settings.` which is unhelpful. The name needs to be set correctly and so far I've tried hubName, HubName, and hubname... none of which work – Jake Boomgaarden Nov 02 '22 at 11:17