Class: Quebert::Controller::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/quebert/controller/base.rb

Overview

The most Controller. Doesn’t even accept the queue as an argument because there’s nothing a job can do to be rescheduled, etc.

Direct Known Subclasses

Beanstalk

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/quebert/controller/base.rb', line 8

def initialize(job)
  @job = job
end

Instance Attribute Details

#jobObject (readonly)

Returns the value of attribute job.



6
7
8
# File 'lib/quebert/controller/base.rb', line 6

def job
  @job
end

Instance Method Details

#performObject



12
13
14
15
16
17
18
# File 'lib/quebert/controller/base.rb', line 12

def perform
  begin
    job.perform!
  rescue Job::Action
    # Nothing to do chief!
  end
end