Created
May 7, 2012 17:26
-
-
Save iwein/2629101 to your computer and use it in GitHub Desktop.
worker script
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
| //there's an argument payload that gets a json file passed in containing the hosts | |
| args = parser.parse_args() | |
| hosts = False | |
| if args.payload is not None: | |
| payload = json.loads(open(args.payload).read()) | |
| if 'herokuping' in payload: | |
| hosts = (payload['herokuping']['hosts']) | |
| print hosts | |
| for host in hosts: | |
| print "Pinging "+host | |
| httpServ = httplib.HTTPConnection(host, 80) | |
| httpServ.connect() | |
| httpServ.request('GET', "/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment