HangfireIO / HangfireIO/Hangfire
Hangfire calls my database every 5 minutes no matter what configuration set
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
Even though I set all these configurations to TimeSpan.FromDays(1), hangfire still calls my database every 5 minutes. I see this database call from Azure App Insights.
This is my configuration in program.cs. I am using .NET 6
```
var options = new SqlServerStorageOptions
{
QueuePollInterval = TimeSpan.FromDays(1),
};
builder.Services.AddHangfire(configuration => configuration
.UseSqlServerStorage(myServicesConnStr, options)
.UseFilter(new AutomaticRetryAttribute { Attempts = 2, DelaysInSeconds = new int[] { 60, 120 } })
);
builder.Services.AddHangfireServer(
options =>
{
options.WorkerCount = 1;
options.SchedulePollingInterval = TimeSpan.FromDays(1);
options.HeartbeatInterval = TimeSpan.FromDays(1);
options.ServerCheckInterval = TimeSpan.FromDays(1);
}
);
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
StatsPollingInterval = 600000,
Authorization = new[]
{
new HangfireCustomBasicAuthenticationFilter{
User = builder.Configuration.GetSection("HangfireSettings:UserName").Value,
Pass = builder.Configuration.GetSection("HangfireSettings:Password").Value
}
}
});
```
Contributor guide
Assessment
This issue has not been assessed yet.