0
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

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.