leahneukirchen/nq

[Feature request] Unbuffered output to the logfiles

zetok opened this issue · 1 comments

zetok commented

OS: Debian 10 amd64
nq version: 0.3.1-1

Currently nq buffers the writing of queued command output to logfile, writing to it only once the buffer fills up / the task is done. When the queued task is not heavy with output, it can take a long time to see any output with fq, possibly even not seeing any output until the job is done.

Buffered writes to logfile make sense when the job in question produces a lot of output in a short timeframe, and is at the same time the preferable way of doing things performance-wise. However it is somewhat problematic for jobs that don't produce a lot of output.

It would be nice to have an option to make fq have unbuffered writes to the logfile.

zetok commented

Looks like I got it wrong what causes the buffering – the queued job was using a program written in python, which automatically makes output buffered when it's not attached to an interactive terminal.

Sorry for the noise, closing the issue.