Example Configuration - nsweeting/qpush GitHub Wiki
Here is an example of a more complex configuration with multiple workers.
# Example config.rb
# QPush worker configuration
mail_worker = QPush::Server.build_worker do |worker|
worker.namespace = 'mail'
worker.priorities = 5
worker.queue_threads = 10
worker.perform_threads = 10
worker.delay_threads = 2
end
# QPush worker configuration
bill_worker = QPush::Server.build_worker do |worker|
worker.namespace = 'billing'
worker.priorities = 5
worker.queue_threads = 5
worker.perform_threads = 5
worker.delay_threads = 1
end
# QPush server configuration
QPush::Server.configure do |config|
config.redis_url = ENV['REDIS_URL']
config.redis_pool = 30
config.jobs_path = '/path/to/jobs'
config.workers = [ mail_worker, bill_worker ]
end
We then launch our server with:
$ bundle exec qpush-server -c config.rb