Skip to content

Instantly share code, notes, and snippets.

@iwein
Created May 7, 2012 17:26
Show Gist options
  • Select an option

  • Save iwein/2629101 to your computer and use it in GitHub Desktop.

Select an option

Save iwein/2629101 to your computer and use it in GitHub Desktop.
worker script
//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