Class: ProgressJob::ProgressController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ProgressJob::ProgressController
- Defined in:
- app/controllers/progress_job/progress_controller.rb
Instance Method Summary collapse
Instance Method Details
#progress ⇒ Object
6 7 8 9 10 11 |
# File 'app/controllers/progress_job/progress_controller.rb', line 6 def progress @current_job = Delayed::Job.find(params[:job_id]) percentage = current_job.current_progress / current_job.max_progress.to_f * 100 @current_job[:percentage] = percentage render json: @current_job end |