I’m using the Enqueue override method to pass a dependency as described here: http://docs.hangfire.io/en/latest/background-methods/passing-dependencies.html.
In my case I’m using an interface and then resolving it later on with my di container it in the background processing service. The code looks something like this:
BackgroundJob.Enqueue(x => x.Send(13, “Hello!”));
The normal technique of using an attribute on the method doesn’t seem to work; the job always runs in the default queue. That makes sense as I’m not actually passing an instance of the IEmailSender to the Enqueue method. How can a specify a queue?