Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. defmodule Ipc.CohortsRequestConsumer do
  2. use RailwayIpc.RequestsConsumer,
  3. exchange: "ipc:cohorts:requests",
  4. queue: "ipc:cohorts_requests"
  5.  
  6. def handle_in(%LearnIpc.Requests.Cohorts{} = _req) do
  7. cohorts = Cohort.all
  8. response = LearnIpc.Documents.Cohorts.new(cohorts: cohorts)
  9. {:reply, response}
  10. end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement