c# - Hangfire recurring job failed without any mention -
i use sql server store hangfire data , self-written logger log stuff hangfire of asp.net mvc 5 site. problem can startup hangfire, configure it, add new recurring job without problems, doesn't work (failed state in hangfire.job
table).
i use owinstartup
configuration:
public static void configurehangfire(iappbuilder app, string connectionname) { var options = new sqlserverstorageoptions { queuepollinterval = timespan.fromseconds(10) }; globalconfiguration.configuration.usesqlserverstorage(connectionname, options); // not try rerun failed jobs default! globaljobfilters.filters.add(new automaticretryattribute { attempts = 0 }); // add logs passed log logprovider.setcurrentlogprovider(new mylogprovider())); app.usehangfireserver(); }
i have 2 questions:
- how can make work?
- why not log error messages?
and i've found out answers questions:
first of all, logging became work after had commented line:
globaljobfilters.filters.add(new automaticretryattribute { attempts = 0 });
i've tried change attempts 1, still has not worked. full commenting of code helped. bug? frankly, think so.
and after commenting i've got opportunity receive problem message. , problem class owns called method isn't contains parameterless constructor.
Comments
Post a Comment