Now the question is: how to delete a job which has already been scheduled/queued?
As simple as that:
#schedule a delayed method call dj = reminder.delay(run_at: 5.minutes.from_now).send #this is your delayed method object #delete a scheduled delayed job djid = dj.id #this is the assigned delayed_job id Delayed::Job.delete(djid)
Nessun commento:
Posta un commento