Sha256: 9b33bc4d4f9e2f400038ede33148617ee6a6665c3ddef7371cd80f2ae76c5928
Contents?: true
Size: 923 Bytes
Versions: 3
Compression:
Stored size: 923 Bytes
Contents
# Untied consumer as a deamon proccess Here is an example of how to run untied consumer in background. This is useful for deployment automation. We also keep the process ID on a file so you can monitor the process using Monit or God. ## How to Add the following line to your Gemfile: ``` gem 'daemons' ``` Or simple install the [daemons](http://daemons.rubyforge.org/) gem using ``gem install daemons``. That is it, you should call the method ``daemonize`` from the worker class and provide the log and pid directories absolute paths. ```ruby worker = Untied::Consumer::Worker.new worker.daemonize(:pids_dir => pids_dir, :log_dir => log_dir) ``` Now you have access to the following commands: ```sh $ ruby consumerd.rb start $ ruby consumerd.rb status untiedc: running [pid 52324] $ ruby consumerd.rb stop untiedc: trying to stop process with pid 52324... untiedc: process with pid 52324 successfully stopped. ```
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
untied-0.0.7.pre3 | examples/consumer-daemon/README.mkd |
untied-0.0.5 | examples/consumer-daemon/README.mkd |
untied-0.0.4 | examples/consumer-daemon/README.mkd |