Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active September 6, 2018 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/7b4ab37ba543ddf4ff124784cd2021b8 to your computer and use it in GitHub Desktop.
Save deque-blog/7b4ab37ba543ddf4ff124784cd2021b8 to your computer and use it in GitHub Desktop.
def handle_call(:get_history, _from, worker) do
sortedLog = Enum.sort_by(worker.eventLog, fn event -> {event.time, event.origin} end)
{:reply, sortedLog, worker}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment