Class: GoodJob::CronEntriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/good_job/cron_entries_controller.rb

Instance Method Summary collapse

Instance Method Details

#disableObject



26
27
28
29
30
# File 'app/controllers/good_job/cron_entries_controller.rb', line 26

def disable
  @cron_entry = CronEntry.find(params[:cron_key])
  @cron_entry.disable
  redirect_back(fallback_location: cron_entries_path, notice: t(".notice"))
end

#enableObject



20
21
22
23
24
# File 'app/controllers/good_job/cron_entries_controller.rb', line 20

def enable
  @cron_entry = CronEntry.find(params[:cron_key])
  @cron_entry.enable
  redirect_back(fallback_location: cron_entries_path, notice: t(".notice"))
end

#enqueueObject



14
15
16
17
18
# File 'app/controllers/good_job/cron_entries_controller.rb', line 14

def enqueue
  @cron_entry = CronEntry.find(params[:cron_key])
  use_original_locale { @cron_entry.enqueue(Time.current) }
  redirect_back(fallback_location: cron_entries_path, notice: t(".notice"))
end

#indexObject



5
6
7
# File 'app/controllers/good_job/cron_entries_controller.rb', line 5

def index
  @cron_entries = CronEntry.all
end

#showObject



9
10
11
12
# File 'app/controllers/good_job/cron_entries_controller.rb', line 9

def show
  @cron_entry = CronEntry.find(params[:cron_key])
  @jobs_filter = JobsFilter.new(params, @cron_entry.jobs)
end