Class: Shydra::Hydra

Inherits:
Typhoeus::Hydra
  • Object
show all
Defined in:
lib/shydra/hydra.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Hydra



36
37
38
39
# File 'lib/shydra/hydra.rb', line 36

def initialize(options = {})
  options[:max_concurrency] ||= Shydra.max_concurrency
  super(options)
end

Instance Method Details

#dequeueObject



56
57
58
59
# File 'lib/shydra/hydra.rb', line 56

def dequeue
  return if paused?
  super
end

#pause!Object



43
44
45
# File 'lib/shydra/hydra.rb', line 43

def pause!
  @paused = true
end

#paused?Boolean



47
48
49
# File 'lib/shydra/hydra.rb', line 47

def paused?
  @paused
end

#runObject



51
52
53
54
# File 'lib/shydra/hydra.rb', line 51

def run
  @paused = false
  super
end