Hi!
I’m doing the first tests with this incredible framework and I have encountered the following problem.
The queues do not work me, I have two queues (critical and default) and always performed the same queue.
It’s an empty MVC app. Any suggestions?
Owin startup class
app.UseHangfire(config =>
{
config.UseSqlServerStorage("DemoContext");
config.UseServer(queues: new[] { "critical", "default" });
});
Controller
public class HomeController : Controller
{
public ActionResult Index()
{
WriteLine2("A message (default)");
WriteLine("A message (critical)");
return View();
}
[Queue("critical")]
private static void WriteLine(string text)
{
BackgroundJob.Enqueue(() => Console.WriteLine(text));
}
private static void WriteLine2(string text)
{
BackgroundJob.Enqueue(() => Console.WriteLine(text));
}
}