def process_order
OrderProcess.delay(run_at:1.minutes.from_now).processing_order(params[:id])
redirect_to '/'
end
when process_order is executed it will execute delayed job
class OrderProcess
def self.processing_order(order_id)
system("rails generate controller welcome index")
end
end
when we remove delay(run_at:1.minutes.from_now) and process_order then rails commands in system command are getting executed but when we run through delayed job rails commands are not getting executed
thanks in advance
Aucun commentaire:
Enregistrer un commentaire