Hi,
I'd like to stream the same way as I could do with Capistrano2
task :memory do
run "free | awk '/^Mem:/{print $4}'" do | channel, stream, data |
puts "host: #{channel[:host]} has free memory of #{data.to_i/1024} MB"
end
end
Using *capture* wont help as it only prints after the remote command has
finished.
The reason being that sometimes you have long running tasks that gives
feedback to the user which I'd like to stream back to the control machine.
I tried to get my way through SSHKit and the Command class but I really can
not find any place where the output stream from the remote server is
handled.
It would be really cool if we could give an additional closure to execute
and capture that receives the stream.
Any pointers are welcome
thx
ciao robertj
ps: feel free to answer this question on SO
(http://stackoverflow.com/questions/23102980/can-i-stream-the-output-with-capistrano-3-while-the-remote-command-is-still-runn)
--
You received this message because you are subscribed to the Google Groups
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/capistrano/e8a56f32-e951-42da-94b1-8770cc673aab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.