Class: Jobbr::DelayedJobsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Jobbr::DelayedJobsController
- Defined in:
- app/controllers/jobbr/delayed_jobs_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 |
# File 'app/controllers/jobbr/delayed_jobs_controller.rb', line 5 def create @job = DelayedJob.run_delayed_by_name(params[:job_name], params) render json: { id: @job.id } end |
#show ⇒ Object
10 11 12 13 |
# File 'app/controllers/jobbr/delayed_jobs_controller.rb', line 10 def show job_run = Run.find(params[:id]) render json: { status: job_run.status, result: job_run.result, progress: job_run.progress } end |