Hangfire.Console
Hangfire.Console copied to clipboard
No console output when using newest hangfire beta 1.7
Hey,
I've currently tried to use Hangfire.Console with the current beta. My setup is very simlpe, a self hosted web api for hosting the dashboard:
...
config
.EnableSwagger(c =>
{
c.BasicAuth("basic")
.Description("Basic HTTP Authentication");
c.SingleApiVersion("v1-0", "Simplic");
c.RootUrl(req => publicAddress);
})
.EnableSwaggerUi();
appBuilder.UseHangfireDashboard();
appBuilder.UseWebApi(config);
...
And a server component:
....
JobStorage.Current = GlobalConfiguration.Configuration
.UseConsole()
.UseMemoryStorage();
var server = new BackgroundJobServer(new BackgroundJobServerOptions
{
HeartbeatInterval = TimeSpan.FromSeconds(1),
ServerCheckInterval = TimeSpan.FromSeconds(1),
SchedulePollingInterval = TimeSpan.FromSeconds(1)
});
....
I get absolutly no output. I've cleared the browser cache and tried some different initialization order. Is there something more I can do to debug the issue?
EDIT: Dashboard and Server are running in the same process.
Thanks a lot!
Hey, @simplicbe.
I suggest you to try another storage. Some of the required features are broken in MemoryStorage, and it hasn't been updated for a long time.
I got same problem when using postgresql. any solution?
Can anyone confirm if the extension works with 1.7.x?
Want to prevent the whole upgrade process if it's not supported thanks.
@marchy yes, it does. There has been a problem with 1.7.0-beta2 due to incorrect Storage capabilities detection, but it is fixed long since.
There could be problems with some 3rd party storages, but if it has worked with your storage on 1.6.x, there’s no reason for it to break after updating to 1.7.x.
That's great to hear, thanks for the quick reply Alexey.
Trying in 1.6.22 (latest of 1.6.x releases) but can't see any output on the job page in the Hangfire Dashboard. Is there any way to debug why it might not be initializing?
It seem's it should just be the one config.UseConsole()
call right?
Here's our Startup::ConfigureServices(..)
:
services.AddHangfire( _ => {
_.UseSqlServerStorage( jobsConnectionString );
_.UseConsole();
});
Oh shoot, really sorry was totally a misnomer on our part. Confirmed up and running beautifully!
Thanks for your super-helpful extension =)