I enqueue task with queue name “ops”.
IBackgroundJobClient client = new BackgroundJobClient();
IState state = new EnqueuedState
{
Queue = “ops”
};
client.Create(() => myTask(), state);
But the queue name will become “default” after automatic fail retry.
May I use the old queue name “ops”?
I have answered similar question here: ReScheduling the job to Default Queue despite it is being set in another Queue
In short, put your queue name in the attribute of the method that you want to execute instead, and use client.Enqueue
instead of client.Create
// I put my queue name in the attribute of the method
BackgroundJob.Enqueue(() => StartWorkflow(apid, startInfo, extendInfo));
[Queue(“ops”)]
public CurrentInfo StartWorkflow(string apid, string startInfo, string extendInfo)
{
…
}
// queue name will become DEFAULT, after retry to enqueuer, like below
Having the same issue.
As workaround I trigger the job from Recurring Jobs page.
I fixed the problem coding a few.
Please refer to my branch: