Sha256: e09f8800ab43d5569908116d95870b1acf9a6d482863f7c1380890b7936a76a5
Contents?: true
Size: 1.78 KB
Versions: 6
Compression:
Stored size: 1.78 KB
Contents
# Spool [](https://rubygems.org/gems/spool) [](https://travis-ci.org/gabynaiman/spool) [](https://coveralls.io/r/gabynaiman/spool?branch=master) [](https://codeclimate.com/github/gabynaiman/spool) [](https://gemnasium.com/gabynaiman/spool) Manage and keep alive pool of processes ## Installation Add this line to your application's Gemfile: gem 'spool' And then execute: $ bundle Or install it yourself as: $ gem install spool ## Usage #### Setup *Worker* loop do puts "#{Process.pid} - #{Time.now}" sleep 1 end *Pool config* processes 4 command 'ruby worker.rb' # optional dir File.dirname(__FILE__) env VAR1: 'foo', VAR2: 'bar' pidfile 'pool.pid' restart_when { |p| p.memory > 512 } #### Start console:~$ spool pool_config.rb #### Signals - **INT/TERM:** quick shutdown, kills all processes immediately - **QUIT:** graceful shutdown, waits for processes to finish - **HUP:** reloads config file and gracefully restart all processes - **USR2:** gracefully restart all processes with current configuration - **TTIN:** increment the number of processes by one - **TTOU:** decrement the number of processes by one ## Contributing 1. Fork it ( https://github.com/gabynaiman/spool/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
spool-1.0.5 | README.md |
spool-1.0.4 | README.md |
spool-1.0.3 | README.md |
spool-1.0.2 | README.md |
spool-1.0.1 | README.md |
spool-1.0.0 | README.md |