Class: TasksSchedulerDaemonController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- TasksSchedulerDaemonController
- Defined in:
- app/controllers/tasks_scheduler_daemon_controller.rb,
app/controllers/tasks_scheduler_daemon_controller/_download_log.rb
Instance Method Summary collapse
Instance Method Details
#download_log ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/controllers/tasks_scheduler_daemon_controller/_download_log.rb', line 4 def download_log return unless download_log_validate_log_key log = ::TasksScheduler::Checker.instance.send("#{download_log_key}_log") return unless download_log_validate_log_exist(log) send_log_file(log) end |
#execute ⇒ Object
10 11 12 13 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 10 def execute @result = ::TasksScheduler::Daemon.execute(params[:tasks_scheduler_execute_action]) render 'index' end |
#index ⇒ Object
8 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 8 def index; end |
#status ⇒ Object
15 16 17 18 |
# File 'app/controllers/tasks_scheduler_daemon_controller.rb', line 15 def status render json: { daemon_running: ::TasksScheduler::Daemon.running?, tasks_all_ok: ::ScheduledTask.all.none?(&:failed?) } end |