CadyIO / hangfire-ravendb

RavenDB job storage for Hangfire
https://www.nuget.org/packages/Hangfire.Raven/
18 stars 35 forks source link

Dashboard not working yet #7

Closed camhart closed 7 years ago

camhart commented 8 years ago
using Hangfire;
using HangFire.Raven.Storage;
using Microsoft.Owin;
using Owin;

[assembly: OwinStartupAttribute(typeof(HangfireServer.Startup))]
namespace HangfireServer
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            ConfigureAuth(app);
            GlobalConfiguration.Configuration.UseRavenStorage("http://localhost:8080", "hangfire");
            app.UseHangfireDashboard();
            app.UseHangfireServer();
        }
    }
}

image

Any ideas why? A database titled "hangfire" does exist and the ravendb server is running at http://localhost:8080.

AndrewMarkley commented 8 years ago

I don't know that the dashboard ever worked. We were not using it in our application.

krivulcik commented 8 years ago

Hangfire itself (queuing, scheduling and processing of background jobs) does work correctly with RavenDB, we have used it for about half a year now in production. However, some features don't work and the dashboard is one of them. RavenDB storage implementation doesn't implement some parts, in this case the RavenStorage.GetMonitoringApi method returns null in https://github.com/cady-io/hangfire-ravendb/blob/master/src/Hangfire.Raven/Storage/RavenStorage.cs#L62 .

sphiecoh commented 8 years ago

After merging in #9 this is no longer the case. RavenStorage.GetMonitoringApi is now implemented.

AustinWinstanley commented 8 years ago

I will look at getting the Dashboard working now that @Sphiecoh got RavenStorage.GetMonitoringApi working. Not sure a timeline yet.

xinix00 commented 8 years ago

Is it still not working? Did I forgot to commit something? It's depending on one index to get the statistics needed to display on the page. public class MyRestrictiveAuthorizationFilter : IDashboardAuthorizationFilter { public bool Authorize([NotNull] DashboardContext context) { return true; } }

Though you should add:

        app.UseHangfireDashboard("/hangfire", new DashboardOptions
        {
            Authorization = new[] { new MyRestrictiveAuthorizationFilter() }
        });
AustinWinstanley commented 7 years ago

Ok, have a working version in an AspNetCore project with the Dashboard working. Will be released soon with an example project.