Skip to content

Instantly share code, notes, and snippets.

@chadaustin
Created January 27, 2015 18:25
Show Gist options
  • Save chadaustin/513ead8c8751247cc21c to your computer and use it in GitHub Desktop.
Save chadaustin/513ead8c8751247cc21c to your computer and use it in GitHub Desktop.
getEntityBodies :: Envelope -> [EntityBody]
getEntityBodies Envelope{..} = ePrimary : HashMap.elems eDenormalized
gatherMounts :: Envelope -> [Imq.ImqUpdateMount]
gatherMounts envelope = catMaybes $ map eUpdates $ getEntityBodies envelope
setupQueuesForEnvelope :: World m => CustomerId -> Envelope -> m ()
setupQueuesForEnvelope cid envelope = do
RestIMQ.setupQueues cid $ gatherMounts envelope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment