File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ In `Startup.cs` _ConfigureServices(IServiceCollection services)_ method add the
35
35
36
36
``` csharp
37
37
services .AddHangfire (config =>
38
- config .UsePostgreSqlStorage (Configuration .GetConnectionString (" HangfireConnection" )));
38
+ config .UsePostgreSqlStorage (c =>
39
+ c .UseNpgsqlConnection (Configuration .GetConnectionString (" HangfireConnection" ))));
39
40
```
40
41
41
42
In Configure method, add these two lines:
@@ -54,16 +55,17 @@ If you encounter any issues/bugs or have idea of a feature regarding Hangfire.Po
54
55
SSL support can be enabled for Hangfire.PostgreSql library using the following mechanism:
55
56
56
57
``` csharp
57
- config .UsePostgreSqlStorage (
58
- Configuration .GetConnectionString (" HangfireConnection" ), // connection string
59
- connection => // connection setup - gets called after instantiating the connection and before any calls to DB are made
60
- {
61
- connection .ProvideClientCertificatesCallback += clientCerts =>
58
+ config .UsePostgreSqlStorage (c =>
59
+ c .UseNpgsqlConnection (
60
+ Configuration .GetConnectionString (" HangfireConnection" ), // connection string,
61
+ connection => // connection setup - gets called after instantiating the connection and before any calls to DB are made
62
62
{
63
- clientCerts .Add (X509Certificate .CreateFromCertFile (" [CERT_FILENAME]" ));
64
- };
65
- },
66
- new PostgreSqlStorageOptions () // no overload without options, so just pass the default or configured options
63
+ connection .ProvideClientCertificatesCallback += clientCerts =>
64
+ {
65
+ clientCerts .Add (X509Certificate .CreateFromCertFile (" [CERT_FILENAME]" ));
66
+ };
67
+ }
68
+ )
67
69
);
68
70
```
69
71
You can’t perform that action at this time.
0 commit comments