Created
April 3, 2014 13:21
-
-
Save blasterpal/9954221 to your computer and use it in GitHub Desktop.
campfire-pid-watcher - need to gemify later...
This file contains hidden or 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
| require 'tinder' | |
| pid = 2461 | |
| message = "DB restore complete!" | |
| campfire = Tinder::Campfire.new 'subdomain', :token =>'zxzxc' | |
| room = campfire.find_room_by_name 'roomname' | |
| puts "watching and waiting for pid #{pid} to complete" | |
| while `ps --no-headers #{pid}`.size > 0 | |
| puts "pid lives, waiting" | |
| sleep 10 | |
| # try again | |
| end | |
| room.speak message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment