Class: DelayedJobsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/delayed_jobs_controller.rb

Instance Method Summary collapse

Instance Method Details

#countsObject



14
15
16
17
18
19
# File 'app/controllers/delayed_jobs_controller.rb', line 14

def counts
  @wip_counts     = wip_jobs.count
  @failing_counts = failing_jobs.count
  @overdue_counts = overdue_jobs.count
  @future_counts  = future_jobs.count
end

#failingObject



25
26
27
28
# File 'app/controllers/delayed_jobs_controller.rb', line 25

def failing
  @jobs = failing_jobs
  render :layout =>nil
end

#futureObject



33
34
35
36
# File 'app/controllers/delayed_jobs_controller.rb', line 33

def future
  @jobs = future_jobs
  render :layout =>nil
end

#indexObject



3
4
# File 'app/controllers/delayed_jobs_controller.rb', line 3

def index
end

#overdueObject



29
30
31
32
# File 'app/controllers/delayed_jobs_controller.rb', line 29

def overdue
  @jobs = overdue_jobs
  render :layout =>nil
end

#showObject



6
7
8
9
10
11
12
13
# File 'app/controllers/delayed_jobs_controller.rb', line 6

def show
  begin
    @job = Delayed::Job.find(params[:id])
    render :layout =>nil
  rescue ActiveRecord::RecordNotFound => rnf
    render :text => "Not found, maybe it finished?"
  end
end

#wipObject



21
22
23
24
# File 'app/controllers/delayed_jobs_controller.rb', line 21

def wip
  @jobs = wip_jobs
  render :layout =>nil
end