0.0
No commit activity in last 3 years
No release in over 3 years
Ping a Cronut server
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0

Runtime

 Project Readme

PingMeMaybe

PingMeMaybe is a small library to be used in conjunction with Cronut, a dead man's switch server implementation in Rails.

Installation

Add this line to your application's Gemfile:

gem 'ping_me_maybe'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ping_me_maybe

Usage

PingMeMaybe allows you to ping your Cronut server in jobs that Cronut monitors. To use PingMeMaybe start by adding the Ping ID you wish to ping from your Cronut server as a variable to your Resque job. Then simply invoke the class method .ping_cronut on PingMeMaybe, passing it the Cronut Ping ID. Example:

    class SomeResqueJob
        @queue = :some_queue
        CRONUT_PING_ID = 'ABCD1234'
        
        def self.perform(some_object_id)
			begin
			    ...
			    PingMeMaybe.ping_cronut(CRONUT_PING_ID)
			    ...
			 rescue StandardError => e
			     Rails.logger.error(e.inspect)
			     raise
			 end
        end
    end

Contributing

  1. Fork it ( https://github.com/harrystech/ping-me-maybe/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 new Pull Request