def on_open(ws): pagerduty_event(event_type='resolve', incident_key='tutum-stream', description='Tutum Stream connection open.') print "Connected"
def on_close(ws): pagerduty_event(event_type='trigger', incident_key='tutum-stream', description='Tutum Stream connection closed.') print "### closed ###"