Server Configuration - nsweeting/qpush GitHub Wiki

There are a number of configuration options available for our server. Below is a list of all of them with their default values.

# QPush server config defaults
{
  redis_url: ENV['REDIS_URL'],
  database_url: ENV['DATABASE_URL'],
  redis_pool: 10,
  database_pool: 10,
  jobs_path: '/jobs',
  workers: [ QPush::Server::WorkerConfig.new ]
}

We can modify any of these by providing a config file during the launch of a QPush server.

$ bundle exec qpush-server -c config.rb

# QPush server configuration
QPush::Server.configure do |config|
  config.redis_url = ENV['REDIS_URL']
  config.redis_pool = 10
  config.jobs_path = '/path/to/jobs'
  # etc...
  # ...
  # ...
end

Below is a list of the config options with brief explanations of their meanings:

####redis_url The address of your redis server, with username and password included. This is also required for QPush clients.

####redis_pool The number of connections to our redis server to make available. This is also required for QPush clients.

####database_url The address of your relational database, with username and password included. This is only required if your jobs need to access a database. Make sure you add the gem required for whatever database you use. This is only required for QPush servers.

####database_pool The number of connections to our relational database server to make available. This is only required for QPush servers.

####jobs_path The path, relative to the process working directory that we place our jobs under. Upon launch, the QPush server will 'require' all the files within this folder - as well as all its subfolders. This is only required for QPush servers.

####workers The workers to fork for our server. Each fork runs as a different process. This is only required for QPush servers. This must be an Array of WorkerConfig objects.

Please read the Worker Configuration section for details on how to do this.