Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:ruby-amqp/rubybunny.info
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Feb 3, 2017
2 parents 99c9dcc + 6fec4f0 commit 6e3f80f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion articles/connecting.md
Expand Up @@ -275,10 +275,16 @@ if defined?(PhusionPassenger) # otherwise it breaks rake commands if you put thi
# Now is a good time to connect to RabbitMQ
$rabbitmq_connection = Bunny.new
$rabbitmq_connection.start

$rabbitmq_channel = $rabbitmq_connection.create_channel
end
end

PhusionPassenger.on_event(:stopping_worker_process) do
if $rabbitmq_connection
$rabbitmq_connection.close
end
end
end
```

Expand Down

0 comments on commit 6e3f80f

Please sign in to comment.