File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Providers/AspNetCore/Revo.AspNetCore/Core Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
3
3
<PropertyGroup >
4
- <VersionPrefix >1.34.0 </VersionPrefix >
4
+ <VersionPrefix >1.34.1 </VersionPrefix >
5
5
</PropertyGroup >
6
6
7
7
<PropertyGroup >
Original file line number Diff line number Diff line change @@ -23,18 +23,19 @@ public void ConfigureServices(IServiceCollection services)
23
23
{
24
24
var storage = hangfireConfigurationSection . JobStorage ( ) ;
25
25
26
+ // this needs to be set here, otherwise Hangfire throws error when enqueuing a job
27
+ // before IGlobalConfiguration has been first requested by the DI container
28
+ GlobalConfiguration . Configuration . UseStorage ( storage ) ;
29
+
26
30
services
27
- . AddHangfire ( globalCfg =>
31
+ . AddHangfire ( configuration =>
28
32
{
29
- globalCfg . UseStorage ( storage ) ;
30
-
33
+ configuration . UseActivator ( new HangfireJobActivator ( kernel ) ) ;
34
+
31
35
foreach ( var action in hangfireConfigurationSection . ConfigurationActions )
32
36
{
33
- action ( globalCfg ) ;
37
+ action ( configuration ) ;
34
38
}
35
-
36
- globalCfg . UseNLogLogProvider ( ) ;
37
- globalCfg . UseActivator ( new HangfireJobActivator ( kernel ) ) ;
38
39
} ) ;
39
40
40
41
if ( hangfireConfigurationSection . AddHangfireServer )
Original file line number Diff line number Diff line change 1
1
# RELEASE NOTES
2
2
3
+ ## [ 1.34.1] - 2023-04-04
4
+
5
+ ### Fixed
6
+ - set Hangfire JobStorage early to prevent errors when calling it before its server starts
7
+
3
8
## [ 1.34.0] - 2023-03-17
4
9
5
10
### Changed
You can’t perform that action at this time.
0 commit comments