I’m seeing jobs scheduled to be retired that never actually get retried. Retry attempt 1 of 3: Email down. And it just sits in the scheduled jobs queue never to do anything. Scheduled 3 months ago (+15ms). Why not getting retried? How to diagnose?
Here is my configuration.
I am using the auto retry attribute.
var sb = new NpgsqlConnectionStringBuilder( ConfigurationManager.ConnectionStrings["postgres-db"].ConnectionString) { Pooling = false };
var storage = new PostgreSqlStorage(sb.ConnectionString); Hangfire.GlobalConfiguration.Configuration.UseStorage(storage); JobStorage.Current = storage; Hangfire.GlobalConfiguration.Configuration.UseLog4NetLogProvider(); Hangfire.GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute {Attempts = 3});
app.Map("/hf", hf => { hf.UseErrorPage(); hf.UseHangfireServer();
var filter = new BasicAuthAuthorizationFilter( new BasicAuthAuthorizationFilterOptions { SslRedirect = false, // Require secure connection for dashboard RequireSsl = false, // Case sensitive login checking LoginCaseSensitive = true, // Users Users = new[] { new BasicAuthAuthorizationUser { Login = "admin", // Password as SHA1 hash Password = new byte[] { 0xdd, 0x13, 0x0b, 0x11, 0x8d, 0x13, 0x8d } } } });
hf.UseHangfireDashboard("/dashboard", new DashboardOptions { AuthorizationFilters = new[] { filter }, AppPath = ServiceEndpoints.Configured["notifications"].Url().AbsolutePath + "hf/dashboard" }, storage); });