Skip to content

Commit

Permalink
example on how to use overflow management
Browse files Browse the repository at this point in the history
  • Loading branch information
taganaka committed Jun 29, 2014
1 parent dbd7f63 commit 5bebd9a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/basic.rb
Expand Up @@ -20,7 +20,14 @@
user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/537.71',
# Use 5 threads
workers: 5,
# Logs goes to the crawler.log file
# Queue overflow settings:
# * No more than 5000 elements on the Redis queue
# * Exceeded Items will stored on Mongo into 'rubygems_queue_overflow' collection
# * Check cycle is done every 60 sec
queue_items_limit: 5_000,
queue_overflow_adapter: Polipus::QueueOverflow.mongo_queue(mongo, 'rubygems_queue_overflow'),
queue_overflow_manager_check_time: 60,
# Logs goes to the stdout
logger: Logger.new(STDOUT)
}
Polipus::Plugin.register Polipus::Plugin::Cleaner, reset: true
Expand Down

0 comments on commit 5bebd9a

Please sign in to comment.