Created
July 8, 2016 14:46
-
-
Save willrax/f8e09c5726990fe5c19fcc227075af27 to your computer and use it in GitHub Desktop.
PagerDuty Event
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
def handle_event({:site_checked, {:change, site, payload}}, state) do | |
%{from: old_status, to: new_status} = payload | |
trigger_pagerduty(site, new_status, old_status) | |
{:ok, state} | |
end | |
def handle_event(_, state), do: {:ok, state} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment