You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make batch run --follow actually stream, and terminate (#16)
--follow previously waited for the execution to finish and then printed its
output in one block, which for a long job means staring at nothing for its whole
duration. The first attempt at fixing that held a server-side follow open
instead, and was worse: the server never closes a followed batch log, so the
command hung until killed, and because it attached only after the execution left
the queue it still showed everything at once.
Tailing from a byte offset instead gives both properties. Output appears as it is
produced -- verified against a job that prints every two seconds, and the lines
arrive two seconds apart -- and the loop ends when the execution reaches a
terminal state, which is where the answer to "is there more?" actually lives.
The status is read before the log so a final read cannot miss anything written
between the two.
batch logs --follow uses the same loop, so it no longer hangs on an execution
that has already finished.
0 commit comments