resque-scheduler icon indicating copy to clipboard operation
resque-scheduler copied to clipboard

enqueue_at not working

Open seb-sykio opened this issue 6 years ago • 4 comments

hi, when I use Resque.enqueue_at(10.seconds.from_now, SendMailJob, :my_id => id) my job is correctly added to delayed job, then it is added to default queue, then I can see in resque-web that it has been counted as a success but I dont receive any mail If I do SendMailJob.perform_later(:my_id => id)

then I receive a mail.

my job:

class SendMailJob < ActiveJob::Base
  queue_as :default
  
  def self.queue
    :default
  end

  def perform(params)
    user = User.find(params[:id])
    ...
  end
end

Im also using gem active_scheduler what am I doing wrong ?

seb-sykio avatar Jun 30 '18 12:06 seb-sykio

What ActionMailer delivery method are you calling in your job? Are you using deliver_now?

ruckus avatar Dec 19 '18 17:12 ruckus

yes I use deliver_now, but anyway, with log I can clearly see that "perform" method is not called at all

seb-sykio avatar Jan 17 '20 18:01 seb-sykio

I'm seeing this same behavior. Haven't found a solution yet.

amorimlucas avatar Apr 06 '20 07:04 amorimlucas

Running rake environment resque:scheduler instead of rake resque:scheduler resolved this for me.

amorimlucas avatar Apr 06 '20 08:04 amorimlucas