Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console section not showing when setting custom hangfire dashboard path #123

Open
Rickedb opened this issue Sep 27, 2022 · 0 comments
Open

Comments

@Rickedb
Copy link

Rickedb commented Sep 27, 2022

Using .Net 6.

Program.cs:

builder.Services.AddHangfire(c => 
                    c.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
                     .UseSimpleAssemblyNameTypeSerializer()
                     .UseRecommendedSerializerSettings()
                     .UsePostgreSqlStorage(connection)
                     .UseConsole()
                    ).AddHangfireServer();
....
app.UseHangfireDashboard("/custom/dashboard");

Job:

public void Run(DateTime date, PerformContext context)
{
   context.SetTextColor(ConsoleTextColor.White);
   context.WriteLine($"Processing for date: {date:yyyy-MM-dd}");
   var bar = context.WriteProgressBar();
   bar.SetValue(100);
}

Work as expected when just using the default app.UseHangfireDashboard()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant