dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

More ajaxian reporting #72

Closed gabriel403 closed 10 years ago

gabriel403 commented 11 years ago

When running a command it would be ideal if it redirected output to another file, then ajax requests could pick up the output from the file.

Such a case where this would be useful would be when the unit tests take a reasonable amount of time (big apps, db tests etc), currently you'd see no output till the tests have finished.

Or instead of an xhr fetching them you could use something like socket.io to stream from the server to the client.

This would be an enhancement for the future (just wanted to get it noted down)

dancryer commented 11 years ago

I wouldn't be keen to implement socket.io (or really any other non-PHP / non-standard technologies,) but the output could be piped to another PHPCI console command I guess, which could update the log at certain intervals.

So like phpunit ..... > /phpci/console phpci:update-log --build=X --plugin=phpunit perhaps...?

gabriel403 commented 11 years ago

Either redirect it to another process or to a file and just read from the file when it does the xhr.

tobiastom commented 11 years ago

Or execute the tasks through node.js anyway, get the output in "realtime" and distribute it to anyone interested via socket.io.

MattiJarvinen-BA commented 10 years ago

I wouldn't go as far as to add node.js to this. Simple 0.5s poll interval to a resource and retry until you get something else than header 404 should suffice.

dancryer commented 10 years ago

I believe that the solution implemented for #67 will fix this, when it lands.