Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help/reference: what is the correct way to retrieve the output of a pipe with async steps? #13

Closed
osher opened this issue Sep 27, 2016 · 3 comments

Comments

@osher
Copy link

osher commented Sep 27, 2016

Hi.

I got the idea of

var bpCfg = require('config');
var bagpipes = require('bagpipes').create( bpCfg.pipes, bpCfg.options );
bagpipes.play(bagpipes.getPipe(pipeName), ctx)

//wait
ctx.output

But I'm having trouble to figure where do I deliver the final-result callback...

I saw the project in use in swagger-node-runner, and I saw there something with _finish - this doesn't look like a finished API. Is the project immature? I hope not ... ..I mean I hope it is mature...

Help?

@theganyo
Copy link
Contributor

Hey osher,

You have to treat a pipe as an async process. Thus, the end fitting of the pipe should do whatever you want it to. I considered adding a notification or other API for the completion of the pipe, but it just seemed redundant to simply adding a fitting at the end. Do you think that's confusing?

Scott

@theganyo
Copy link
Contributor

BTW: I just remember that this "issue" is already mentioned here: #11, so I'm going to close this in favor of that one. If you have specific ideas around what would make the most sense to you, please comment there.

@osher
Copy link
Author

osher commented Sep 28, 2016

roger that. I'll be at #11

On Tue, Sep 27, 2016 at 7:01 PM, Scott Ganyo [email protected]
wrote:

BTW: I just remember that this "issue" is already mentioned here: #11
#11, so I'm going to close
this in favor of that one. If you have specific ideas around what would
make the most sense to you, please comment there.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAxBHVTY-7yC1gEALDhgHjzuIXFYNSbKks5quT2_gaJpZM4KHbCy
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants