开发者

delayed_job Won't Process My Queue?

开发者 https://www.devze.com 2023-04-09 17:32 出处:网络
I am using the delayed_jobs gem but using it against 2 queues.I have mapped my models against the correct queues (dbs) to establish correct connections.

I am using the delayed_jobs gem but using it against 2 queues. I have mapped my models against the correct queues (dbs) to establish correct connections.

The jobs get entered in fine - however, delayed_jobs will process one queue fine but not the other. I am trying to manually force it to process the email queue but it simply won't.

Is there a way to config/force it to? Or pass it the correct backend to process?

See below I am counting jobs - getting a correct count. How开发者_C百科ever, if I try to 'work_off' the queue its showing 0 success/fails.

Pretty sure because its hitting the wrong queue. Any ideas?

Delayed::Worker::Email::Job.count => 12032

Delayed::Worker.new(:backend => Email::Job).work_off => [0, 0]


I ended up just going with one queue. This seemed to work best and save the headache of juggling two. Would be cool if DJ would eventually support multi-backends/queues.

0

精彩评论

暂无评论...
验证码 换一张
取 消