mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-07-08 05:45:10 +00:00
Add scheduler
This commit is contained in:
19
Bot/Registration/HangfireRegistration.cs
Normal file
19
Bot/Registration/HangfireRegistration.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Hangfire;
|
||||
|
||||
namespace Lunaris2.Registration;
|
||||
|
||||
public static class HangfireRegistration
|
||||
{
|
||||
public static IApplicationBuilder UseHangfireDashboardAndServer(this IApplicationBuilder app, string dashboardPath = "/hangfire")
|
||||
{
|
||||
var dashboardOptions = new DashboardOptions
|
||||
{
|
||||
DarkModeEnabled = true,
|
||||
DashboardTitle = "Lunaris Jobs Dashboard"
|
||||
};
|
||||
|
||||
app.UseHangfireDashboard(dashboardPath, dashboardOptions);
|
||||
|
||||
return app;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user