[ANN] Ruby/Watchcat 1.0.1 and Ruby/Watchcat-pure 1.0.0

Discussion in 'Ruby' started by Andre Nathan, Aug 6, 2008.

  1. Andre Nathan

    Andre Nathan Guest

    Hello

    I'm pleased to announce a new release of Ruby/Watchcat. This release
    includes a fix to a possible descriptor leak in the C extension and also
    a pure-Ruby version of the library, which makes it usable in other Ruby
    implementations. RDoc documentation is now available too.

    Ruby/Watchcat is an extension for Ruby for the development of
    watchcatd-aware applications.

    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.

    Install it with

    gem install ruby-watchcat

    or

    gem install ruby-watchcat-pure

    Examples:

    require 'watchcat'

    # Create a new cat.
    cat = Watchcat.new:)timeout => 10, :signal => 'KILL',
    :info => 'killing from ruby')
    loop do
    # Here you do something that could exceed the timeout
    sleep 9 + rand(3)
    cat.heartbeat # we're still alive
    end
    cat.close # clean the cat's litter box

    You can also use a block, in which case the cat cleans its own litter
    box:

    require 'watchcat'

    Watchcat.new do |cat|
    loop do
    do_something_that_can_be_slow
    cat.heartbeat
    end
    end

    For more details, please refer to the README file in the distribution
    and in the project's homepage at

    http://oss.digirati.com.br/ruby-watchcat/


    Best regards,
    Andre Nathan
    Andre Nathan, Aug 6, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Todd Aspeotis
    Replies:
    3
    Views:
    460
    Kanenas
    May 30, 2005
  2. Replies:
    4
    Views:
    787
    Ben C
    Mar 29, 2008
  3. Michael Neumann

    [ANN] postgres-pr (pure Ruby PostgreSQL)

    Michael Neumann, Nov 18, 2004, in forum: Ruby
    Replies:
    29
    Views:
    399
    Abraham Vionas
    Nov 30, 2004
  4. David Balmain
    Replies:
    5
    Views:
    118
    David Balmain
    Nov 15, 2005
  5. David Balmain
    Replies:
    2
    Views:
    92
    David Balmain
    Dec 3, 2005
Loading...

Share This Page