Class: Workling::Remote::Runners::ClientRunner

Inherits:
Base
  • Object
show all
Defined in:
lib/workling/remote/runners/client_runner.rb

Direct Known Subclasses

StarlingRunner

Instance Method Summary (collapse)

Methods inherited from Base

#dispatch!, #logger

Instance Method Details

- (Object) run(clazz, method, options = {})

enqueues the job onto the client



32
33
34
35
36
37
38
39
40
41
# File 'lib/workling/remote/runners/client_runner.rb', line 32

def run(clazz, method, options = {})
  
  # neet to connect in here as opposed to the constructor, since the EM loop is
  # not available there. 
  @connected ||= self.class.client.connect
  
  self.class.client.request(@@routing.queue_for(clazz, method), options)    
  
  return nil
end