Class: ScheduledTasksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ScheduledTasksController
- Defined in:
- app/controllers/scheduled_tasks_controller.rb
Instance Method Summary collapse
Instance Method Details
#log ⇒ Object
26 27 28 29 |
# File 'app/controllers/scheduled_tasks_controller.rb', line 26 def log record = find_if_allowed(params[:id], :read) @log_file = record.log_file(params[:identifier]) end |
#run_now ⇒ Object
38 39 40 41 42 43 44 |
# File 'app/controllers/scheduled_tasks_controller.rb', line 38 def run_now process_action_link_action do |record| record.update!(next_run: Time.zone.now) record.reload flash[:info] = "Next run adjusted to #{record.next_run}" end end |
#status ⇒ Object
31 |
# File 'app/controllers/scheduled_tasks_controller.rb', line 31 def status; end |
#status_content ⇒ Object
33 34 35 36 |
# File 'app/controllers/scheduled_tasks_controller.rb', line 33 def status_content @scheduled_tasks = ::ScheduledTask.order(task: :asc, scheduling: :asc) render layout: false end |