Class: TasksSchedulerDaemonController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- TasksSchedulerDaemonController
- Defined in:
- app/controllers/tasks_scheduler_daemon_controller.rb
Instance Method Summary collapse
Instance Method Details
#download_log ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 15 def download_log if File.exist?(::TasksScheduler::Checker.instance.log_path) send_log_file else redirect_to(tasks_scheduler_daemon_path, notice: "Arquivo \"#{::TasksScheduler::Checker.instance.log_path}\" não existe") end end |
#execute ⇒ Object
5 6 7 8 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 5 def execute @result = ::TasksScheduler::Daemon.execute(params[:tasks_scheduler_execute_action]) render 'index' end |
#index ⇒ Object
2 3 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 2 def index end |
#status ⇒ Object
10 11 12 13 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 10 def status render json: { daemon_running: ::TasksScheduler::Daemon.running?, tasks_all_ok: !::ScheduledTask.all.any?(&:failed?) } end |