Skip to content

Instantly share code, notes, and snippets.

@meson10
Created March 16, 2016 03:19
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 meson10/13e7fcea9f4b05b1af83 to your computer and use it in GitHub Desktop.
Save meson10/13e7fcea9f4b05b1af83 to your computer and use it in GitHub Desktop.
Sample gilmour implementation in Ruby
dc_pipeline = responder.compose([
{ topic: 'private.customer.datacenter.create', message: data },
{ topic: 'private.validate' }
])
nodes_pipeline = responder.compose([
responder.parallel([
{ topic: 'private.customer.logger.create', message: data,
opts: { timeout: 900} },
]),
->(d) { d.reduce({}) { |m, out| m.merge(out[:data]) } },
{ topic: 'private.validate' }
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment