Class: Wayfarer::Middleware::Stage
- Inherits:
-
Object
- Object
- Wayfarer::Middleware::Stage
- Extended by:
- Base
- Defined in:
- lib/wayfarer/middleware/stage.rb
Defined Under Namespace
Modules: API
Constant Summary
Constants included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#call(task) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wayfarer/middleware/stage.rb', line 14 def call(task) task[:staged_urls] = Set.new yield if block_given? task[:staged_urls].each do |url| task[:job].class.crawl(url, batch: task.batch) end task[:staged_urls].clear end |