Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extension methods for registering the SQL durability provider #31

Merged
merged 1 commit into from
Jun 13, 2021

Conversation

cgillum
Copy link
Member

@cgillum cgillum commented Jun 13, 2021

Resolves #30

This PR adds an extension method to register the Durable Task SQL storage provider for Azure Functions (and Azure Web Jobs).

Here is an example of how we register the SQL provider in our integration tests.

this.functionsHost = new HostBuilder()
    .ConfigureLogging(
        loggingBuilder =>
        {
            loggingBuilder.AddProvider(this.logProvider);
            loggingBuilder.SetMinimumLevel(LogLevel.Information);
        })
    .ConfigureWebJobs(
        webJobsBuilder =>
        {
            webJobsBuilder.AddDurableTask(options =>
            {
                options.StorageProvider["type"] = "mssql";
            });
        })
    .ConfigureServices(
        services =>
        {
            services.AddSingleton<INameResolver>(this.settingsResolver);
            services.AddSingleton<IConnectionStringResolver>(this.settingsResolver);
            services.AddSingleton<ITypeLocator>(this.typeLocator);
            services.AddDurableTaskSqlProvider();
        })
    .Build();

Also in this PR:

  • Increment version to v0.9.1-beta
  • Update dependencies
  • Minor doc updates

@cgillum cgillum self-assigned this Jun 13, 2021
@cgillum cgillum merged commit d0eaeee into main Jun 13, 2021
@cgillum cgillum deleted the v0.9.1 branch June 13, 2021 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose a method to register SqlDurabilityProviderFactory for integration testing purpose
1 participant