Class: SolidQueueInterface::JobsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/solid_queue_interface/jobs_controller.rb

Instance Method Summary collapse

Instance Method Details

#blockedObject



15
16
17
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 15

def blocked
  @pagy, @jobs = pagy(SolidQueue::BlockedExecution.order(created_at: :desc))
end

#claimedObject



19
20
21
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 19

def claimed
  @pagy, @jobs = pagy(SolidQueue::ClaimedExecution.order(created_at: :desc))
end

#failedObject



11
12
13
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 11

def failed
  @pagy, @jobs = pagy(SolidQueue::FailedExecution.order(created_at: :desc))
end

#indexObject



3
4
5
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 3

def index
  @pagy, @jobs = pagy(SolidQueue::Job.order(created_at: :desc))
end

#readyObject



23
24
25
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 23

def ready
  @pagy, @jobs = pagy(SolidQueue::ReadyExecution.order(created_at: :desc))
end

#recurringObject



27
28
29
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 27

def recurring
  @pagy, @jobs = pagy(SolidQueue::RecurringExecution.order(created_at: :desc))
end

#retryObject



35
36
37
38
39
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 35

def retry
  @job = SolidQueue::Job.find(params[:id])
  @job.retry
  redirect_to failed_solid_queue_interface_jobs_path, notice: "Successfully retried Job ##{@job.id}"
end

#scheduledObject



7
8
9
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 7

def scheduled
  @pagy, @jobs = pagy(SolidQueue::ScheduledExecution.order(created_at: :desc))
end

#showObject



31
32
33
# File 'app/controllers/solid_queue_interface/jobs_controller.rb', line 31

def show
  @job = SolidQueue::FailedExecution.find(params[:id])
end