ASP MVC アプリケーションを発行した後、Hangfire ダッシュボードに、アクティブなサーバーがないと表示されます。DB で Hangfire のテーブルを再起動、再構築、削除しようとしましたが、成功しませんでした。OWIN スタートアップ クラス:
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
app.MapSignalR();
GlobalConfiguration.Configuration
.UseSqlServerStorage(@"HangfireStorage");
var options = new BackgroundJobServerOptions
{
Queues = new[] { "critical", "default" }
};
app.UseHangfireServer(options);
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AuthorizationFilters = new[] { new MyRestrictiveAuthorizationFilter() }
});
var hangfireUpdatingCron = ConfigurationManager.AppSettings["HangfireUpdatingPlayersCron"];
var hangfireUpdatingLeagueMatchesCron = ConfigurationManager.AppSettings["HangfireUpdatingLeagueMatchesCron"];
BackgroundJob.Enqueue(() => SteamParser.ResetAllUpdatings());
BackgroundJob.Enqueue(() => SteamParser.UpdateAllPlayers());
RecurringJob.AddOrUpdate(() => SteamParser.UpdateAllPlayers(), hangfireUpdatingCron);
RecurringJob.AddOrUpdate(() => SteamParser.UpdateLeagueMatches(), hangfireUpdatingLeagueMatchesCron);
}
}