Class: Vx::Worker::Local
- Inherits:
-
Object
- Object
- Vx::Worker::Local
- Includes:
- Common::Helper::Middlewares
- Defined in:
- lib/vx/worker/local.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
-
#initialize(job, _) ⇒ Local
constructor
A new instance of Local.
- #perform ⇒ Object
Constructor Details
#initialize(job, _) ⇒ Local
Returns a new instance of Local.
20 21 22 |
# File 'lib/vx/worker/local.rb', line 20 def initialize(job, _) @job = job end |
Instance Attribute Details
#job ⇒ Object (readonly)
Returns the value of attribute job.
10 11 12 |
# File 'lib/vx/worker/local.rb', line 10 def job @job end |
Instance Method Details
#perform ⇒ Object
24 25 26 27 |
# File 'lib/vx/worker/local.rb', line 24 def perform env = OpenStruct.new job: job run_middlewares(env){ |_| 0 } end |