Skip to content

Commit

Permalink
Updating obsolete usage of postgres storage ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Stenbom committed Nov 15, 2024
1 parent 17165ed commit 96945e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Hangfire.Configuration/Providers/PostgresStorageProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Hangfire.PostgreSql;
using Hangfire.PostgreSql.Factories;

namespace Hangfire.Configuration.Providers;

Expand All @@ -12,5 +13,5 @@ internal class PostgresStorageProvider : IStorageProvider
public bool WorkerBalancerEnabledDefault() => false;

public JobStorage NewStorage(string connectionString, object options) =>
new PostgreSqlStorage(connectionString, (PostgreSqlStorageOptions) options);
new PostgreSqlStorage(new NpgsqlConnectionFactory(connectionString, (PostgreSqlStorageOptions) options));
}

0 comments on commit 96945e8

Please sign in to comment.