Skip to content

Commit 18bb9eb

Browse files
committed
Add peek.php, a live output display for parallel jobs
Long parallel runs currently interleave the output of every job into a single stream, so it is impossible to tell which repository produced which line, or which jobs are still running. peek.php gives each job its own lane in the terminal: a line that shows the job name, its latest output, and its elapsed time, replaced by a final status line when the job exits. Concurrency stays with the caller (xargs -P, parallel, make -j, &); peek only owns the display. Usage is two commands: php peek.php -- <scheduler command> # run the display php peek.php run -n <name> -- <command> # wrap a single job The wrapper degrades to executing its command unchanged whenever the display is unavailable, so callers work either way. That covers platforms without unix domain datagram sockets (Windows), PHP older than 7.4, non-TTY output such as CI logs, and NO_PEEK=1 for opting out. phpcs gets targeted exclusions for the file: it is a single-file tool meant to be copied around as-is, so it mixes functions and classes, and it silences errors when probing optional platform features because "unsupported, fall back to a passthrough" is the intended handling.
1 parent 99ff3f8 commit 18bb9eb

2 files changed

Lines changed: 691 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)