Class: Woodhouse::Progress::ProgressClient

Inherits:
Object
  • Object
show all
Defined in:
lib/woodhouse/extensions/progress.rb

Direct Known Subclasses

BunnyProgressClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ProgressClient

Returns a new instance of ProgressClient.



33
34
35
# File 'lib/woodhouse/extensions/progress.rb', line 33

def initialize(config)
  self.config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



31
32
33
# File 'lib/woodhouse/extensions/progress.rb', line 31

def config
  @config
end

Instance Method Details

#pull(job_id) ⇒ Object



37
38
39
40
41
42
# File 'lib/woodhouse/extensions/progress.rb', line 37

def pull(job_id)
  progress = pull_raw(job_id)
  if progress
    JSON.parse(progress)
  end
end

#pull_raw(job_id) ⇒ Object



44
45
46
# File 'lib/woodhouse/extensions/progress.rb', line 44

def pull_raw(job_id)
  pull_progress(job_id)
end