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
14 15 16 17 18 19 20 21 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 14 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 |
#running ⇒ Object
10 11 12 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 10 def running render plain: (::TasksScheduler::Daemon.running? ? 'true' : 'false'), layout: false end |