I’m pleased to announce the release of Ruby/Watchcat 1.0.0.
Ruby/Watchcat is an extension for Ruby for the development of
Watchcatd is a watchdog-like daemon in the sense that it takes actions
in situations where a machine is under heavy load and/or unresponsive.
However, watchcatd isn’t as drastic as the usual watchdog systems, which
reboot the machine. Instead, all it does is sending a signal to a
registered process (which by default is SIGKILL) if the process doesn’t
send it a heartbeat before a user-specified timeout.
Ruby/Watchcatd allows you to register ruby applications with watchcatd.
Create a new cat.
cat = Watchcat.new(:timeout => 10, :signal => ‘KILL’,
:info => ‘killing from ruby!’)
# Here you do something that could exceed the timeout
sleep 9 + rand(3)
cat.heartbeat # we’re still alive
cat.close # clean the cat’s litter box
You can also use a block, in which case the cat cleans its own litter
Watchcat.new do |cat|
For more details, please refer to the README file in the distribution
in the project’s homepage at http://oss.digirati.com.br/ruby-watchcat/.
This is my first Ruby C extension, so I would greatly appreciate