-
Notifications
You must be signed in to change notification settings - Fork 124
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
Make output unbuffered #317
Conversation
This makes it possible to pipe the output of itamae to other tool and have the output as it happens. Otherwise, the output is buffered and is only available after itamae finishes.
@terceiro Thanks! Could you tell me concretely usage of the "pipe the output of itamae to other tool"? Sync stdout makes a little slow but it's not such a big issue I though. I want to another opinion. |
well it's already the default when stdout is a tty, and also the time it takes to actually process each resource in a recipe is probably orders or magnitude larger than the time it takes to flush the corresponding logs to a non-tty stdout. |
the travis failure (Itamae::Resource::HttpRequest::HTTPClientError) seems unrelated to my change. is that the case, or am I missing something? |
Yes, I know how to "get" itamae's output from stdout, I want to know "what" to use itamae's output. The travis failure is httpbin.org's issue. 😉 |
It's just my curiosity. |
ah, ok. sorry. I'm the author of a tool called chake which I created originally to provide a way of using Chef™ without having a Chef™ server; I am now migrating my stuff to itamae, and adding support for it in chake. chake supports applying config to multiple servers in parallel, and for that it runs the underlying tool with its output to a pipe, so that it can display the output prefixed with the hostname while the tool does its job on each server. |
I released as |
This makes it possible to pipe the output of itamae to other tool and
have the output as it happens. Otherwise, the output is buffered and is
only available after itamae finishes.