I am currently using hangfire to en-queue jobs. The conventional way to en-queue a hangfire job is by using something like this:
BackgroundJob.Enqueue(() => DoWork());
which will then intern en-queue and execute this job in the "DEFAULT" hangfire queue.
I can however add a attribute to the method which will intern be used to determine which queue it will be placed in and executed:
[Queue("SECONDARY")]
public void DoWork()
{
}
My question: Is there a way to to dynamically/programmatically en-queue a hangfire job in a specified queue with out using the above mentioned method attribute?