diff --git a/Hangfire.Job/Hangfire.Job.csproj b/Hangfire.Job/Hangfire.Job.csproj index 3e73d56..5c3b36b 100644 --- a/Hangfire.Job/Hangfire.Job.csproj +++ b/Hangfire.Job/Hangfire.Job.csproj @@ -7,11 +7,10 @@ - - - - - + + + + diff --git a/Hangfire.Job/Program.cs b/Hangfire.Job/Program.cs index aa39236..d0acbb8 100644 --- a/Hangfire.Job/Program.cs +++ b/Hangfire.Job/Program.cs @@ -1,7 +1,6 @@ using Hangfire; using Hangfire.Console; using Hangfire.HttpJob; -using Hangfire.Tags.SqlServer; var builder = WebApplication.CreateBuilder(args); @@ -9,12 +8,13 @@ var builder = WebApplication.CreateBuilder(args); var connectionString = builder.Configuration["ConnectionStrings:Default"]; builder.Services.AddHangfire(config => config + .UseSimpleAssemblyNameTypeSerializer() + .UseRecommendedSerializerSettings() .UseSqlServerStorage(connectionString) - // .UseConsole(new ConsoleOptions() - // { - // BackgroundColor = "#000079" - // }) - // .UseTagsWithSql() + .UseConsole(new ConsoleOptions() + { + BackgroundColor = "#000079" + }) .UseHangfireHttpJob() ); @@ -24,7 +24,7 @@ builder.Services.AddHangfireServer(); var app = builder.Build(); app.UseHangfireDashboard(); -// app.UseHangfireServer(); app.MapGet("/", () => "Hangfire service is running!"); + app.Run(); \ No newline at end of file