Class: Maxwell::Agent::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/maxwell/agent/worker.rb

Direct Known Subclasses

EventedWorker, StandardWorker

Instance Method Summary collapse

Instance Method Details

#perform(work) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/maxwell/agent/worker.rb', line 5

def perform(work)
  work.perform

  post_run(work)
ensure
  work_schedule.put_back(work)
end

#work_scheduleObject



13
14
15
# File 'lib/maxwell/agent/worker.rb', line 13

def work_schedule
  Agent.runner[:work_schedule]
end