Hi all,
i’m in trouble with configuring and using multiple queues.
Here is the content of my startup class:
var options = new DashboardOptions
{
AppPath = VirtualPathUtility.ToAbsolute("~")
};
app.UseHangfireDashboard("/jobs", options);
var queues = new BackgroundJobServerOptions
{
Queues = new[] { "high", "normal" }
};
app.UseHangfireServer(queues);
The server starts correctly and from the dashboard i can see the queues.
But when I try to enqueue a process, hangfire always sets the jobs into the default queue.
This is the call to the method:
BackgroundJob
.Enqueue<IFileConverterService>(
x => x.CreateSlides(docId, folderpath, priority));
This is the method implementation:
public class FileConverterService : IFileConverterService
{
[Queue("high")]
public void CreateSlides(Guid documentId, string folderPath, int priority)
{
//my stuff
}
}
What I’m missing? Thanks