Module: Upperkut::Worker::ClassMethods
- Extended by:
- Forwardable
- Defined in:
- lib/upperkut/worker.rb
Instance Method Summary collapse
- #fetch_items ⇒ Object
- #push_items(items) ⇒ Object
- #setup ⇒ Object
- #setup_upperkut {|setup| ... } ⇒ Object
Instance Method Details
#fetch_items ⇒ Object
25 26 27 |
# File 'lib/upperkut/worker.rb', line 25 def fetch_items strategy.fetch_items end |
#push_items(items) ⇒ Object
19 20 21 22 23 |
# File 'lib/upperkut/worker.rb', line 19 def push_items(items) client_middlewares.invoke(self, items) do strategy.push_items(items) end end |
#setup ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/upperkut/worker.rb', line 33 def setup @config ||= begin config = Upperkut::Configuration.default.clone config.strategy ||= Upperkut::Strategies::BufferedQueue.new(self) config end end |
#setup_upperkut {|setup| ... } ⇒ Object
29 30 31 |
# File 'lib/upperkut/worker.rb', line 29 def setup_upperkut yield(setup) if block_given? end |