Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Configuration

ileitch edited this page Jan 26, 2013 · 10 revisions

Command-line Options

  • -f --foreground Prevent rapns from forking into a daemon.
  • -P N --db-poll N Frequency in seconds to check for new notifications. Default: 2.
  • -F N --feedback-poll N Frequency in seconds to check for feedback. Default: 60.
  • -e --no-error-checks Disables error checking after notification delivery. You may want to disable this if you are sending a very high number of notifications.
  • -n --no-airbrake-notify Disables error notifications via Airbrake.
  • -p PATH --pid-file PATH Path to write PID file. Relative to Rails root unless absolute.
  • -b N --batch-size N ActiveRecord batch size of notifications. Increase for possible higher throughput but higher memory footprint. Default: 5000.

Ruby Configuration File

If you ran rails g rapns you should have a file in config/initializer/rapns.rb which contains the following.

 Rapns.configure do |config|

  # Run in the foreground?
  config.foreground = false

  # Frequency in seconds to check for new notifications.
  config.push_poll = 2

  # Frequency in seconds to check for feedback
  config.feedback_poll = 60

  # Enable/Disable error notifications via Airbrake.
  config.airbrake_notify = true

  # Disable APNs error checking after notification delivery.
  config.check_for_errors = true

  # ActiveRecord notifications batch size.
  config.batch_size = 5000

  # Path to write PID file. Relative to Rails root unless absolute.
  config.pid_file = '/path/to/rapns.pid'

 end
Clone this wiki locally