Created
August 29, 2014 09:06
-
-
Save y-yagi/9f64fb2059442a99f8d9 to your computer and use it in GitHub Desktop.
ping heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Pings PING_URL to keep a dyno alive" | |
task :dyno_ping do | |
require "net/http" | |
if ENV['PING_URL'] | |
uri = URI(ENV['PING_URL']) | |
Net::HTTP.get_response(uri) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment