Skip to content

Instantly share code, notes, and snippets.

@willrax
Created July 8, 2016 14:46
Show Gist options
  • Save willrax/f8e09c5726990fe5c19fcc227075af27 to your computer and use it in GitHub Desktop.
Save willrax/f8e09c5726990fe5c19fcc227075af27 to your computer and use it in GitHub Desktop.
PagerDuty Event
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