Closed 5long closed 11 years ago
Looks good at a glance. I'm going to test it against my common usage scenarios first.
Thanks for the contribution Whyme. This change has been included in v0.1.2 .
Hmm, I just tested the new console handling a bit more and I noticed that it no longer behaves as it was originally designed.
The intention was to simulate console output display on the terminal the same way as the console output is displayed on Jenkins web, i.e. it should progress along the build.
I'm using nestor console
to monitor our deploy job and it works as intended. A moment before I've tested nestor console
with a lengthy frontend assets compiling job and it works too. By "it works" I mean nestor console
and <jenkins url>/job/<job name>/<job id>/console
are printing output as the same pace.
What is the pattern of your job output? Is it a dot matrix of unit test result which doesn't print any \n
for a long time? I'm suspecting that the stdout of node is buffered line-wise but I'm not quite sure.
I'll do more testing against more jobs and see if I can reproduce it.
Also, I'm running nodejs 0.8.22, nestor 0.1.3 and Jenkins 1.480.3 LTS.
Well it turns out that I guessed wrong. process.stdout.write
is synced by default when stdout is TTY: http://nodejs.org/api/process.html#process_process_stdout
Weird, I can't reproduce the problem now. What I saw was tty console output being written without new lines and at a different pace compared to web console output. I used node v0.10.1 .
Don't worry about it. I'll do more testing, but I think it was a false alarm.
Thanks for the confirmation.
This branch is just #10 and: