Class: KubeQueue::Runner
- Inherits:
-
Object
- Object
- KubeQueue::Runner
- Defined in:
- lib/kube_queue/runner.rb
Instance Method Summary collapse
-
#initialize(job_name) ⇒ Runner
constructor
A new instance of Runner.
- #run(payload) ⇒ Object
Constructor Details
#initialize(job_name) ⇒ Runner
Returns a new instance of Runner.
6 7 8 |
# File 'lib/kube_queue/runner.rb', line 6 def initialize(job_name) @job_name = job_name end |
Instance Method Details
#run(payload) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/kube_queue/runner.rb', line 10 def run(payload) payload = JSON.parse(payload) worker = KubeQueue.fetch_worker(@job_name) worker.new.perform(payload) end |