Class: ScheduledTasksController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/scheduled_tasks_controller.rb

Instance Method Summary collapse

Instance Method Details

#logObject



24
25
26
27
# File 'app/controllers/scheduled_tasks_controller.rb', line 24

def log
  record = find_if_allowed(params[:id], :read)
  @log_file = record.log_file(params[:identifier])
end

#run_nowObject



37
38
39
40
41
42
43
# File 'app/controllers/scheduled_tasks_controller.rb', line 37

def run_now
  process_action_link_action do |record|
    record.update_attributes!(next_run: Time.zone.now)
    record.reload
    flash[:info] = "Next run adjusted to #{record.next_run}"
  end
end

#statusObject



29
30
# File 'app/controllers/scheduled_tasks_controller.rb', line 29

def status
end

#status_contentObject



32
33
34
35
# File 'app/controllers/scheduled_tasks_controller.rb', line 32

def status_content
  @scheduled_tasks = ::ScheduledTask.order(task: :asc, scheduling: :asc)
  render layout: false
end