Sha256: 14928d00ef47a42181f77ce02f178811e04e685332bffdabb38ec0dfb0ec1cf8

Contents?: true

Size: 873 Bytes

Versions: 20

Compression:

Stored size: 873 Bytes

Contents

# Generated amqp daemon

# Do your post daemonization configuration here
# At minimum you need just the first line (without the block), or a lot
# of strange things might start happening...
DaemonKit::Application.running! do |config|
  # Trap signals with blocks or procs
  # config.trap( 'INT' ) do
  #   # do something clever
  # end
  # config.trap( 'TERM', Proc.new { puts 'Going down' } )
end

# IMPORTANT CONFIGURATION NOTE
#
# Please review and update 'config/amqp.yml' accordingly or this
# daemon won't work as advertised.

# Run an event-loop for processing
DaemonKit::AMQP.run do
  # Inside this block we're running inside the reactor setup by the
  # amqp gem. Any code in the examples (from the gem) would work just
  # fine here.

  amq = ::MQ.new
  amq.queue('test').subscribe do |msg|
    DaemonKit.logger.debug "Received message: #{msg.inspect}"
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
kennethkalmer-daemon-kit-0.1.1 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.2 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.3 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.4 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.5.1 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.5 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.6 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.7.3 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.7.4 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.7.5 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.7.7 daemon_generators/amqp/templates/libexec/daemon.rb
kennethkalmer-daemon-kit-0.1.7.8 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.7.7 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.7.8 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.5.1 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.7.4 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.6 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.3 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.7 daemon_generators/amqp/templates/libexec/daemon.rb
daemon-kit-0.1.7.5 daemon_generators/amqp/templates/libexec/daemon.rb