Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defmodule Ipc.CohortsRequestConsumer do
- use RailwayIpc.RequestsConsumer,
- exchange: "ipc:cohorts:requests",
- queue: "ipc:cohorts_requests"
- def handle_in(%LearnIpc.Requests.Cohorts{} = _req) do
- cohorts = Cohort.all
- response = LearnIpc.Documents.Cohorts.new(cohorts: cohorts)
- {:reply, response}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement