The old way of doing things looked as so:
var jobConfig = new JobHostConfiguration(cfg.DocumentDatabase.BlobStorageServer)
{
NameResolver = new Support.BlobNameResolver(_env)
};
jobConfig.Queues.MaxPollingInterval = TimeSpan.FromSeconds(_pollSeconds);
_wjHost = new JobHost(jobConfig);
I am trying to translate this to the new way in 3.0, and this is how far I have come:
_wjHost = new HostBuilder().ConfigureWebJobs(b =>
{
b.AddAzureStorage(x =>
{
x.MaxPollingInterval = TimeSpan.FromSeconds(_pollSeconds);
});
}).ConfigureServices(s =>
{
s.AddSingleton<INameResolver, Support.BlobNameResolver>(_ => new Support.BlobNameResolver(_env));
s.Configure<QueuesOptions>(o =>
{
o.MaxPollingInterval = TimeSpan.FromSeconds(_pollSeconds);
});
}).Build();
Firstly, i don't know which MaxPollingInterval is the right one to use... so i set both. I assume i shouldn't be using the one in AddBlobStorage
Secondly, and more importantly, where do I specify the blob storage connection string? In the case above, it's the setting stored in cfg.DocumentDatabase.BlobStorageServer
Thanks