[PATCH 0/4] Improve delayer
Julien ÉLIE
julien at trigofacile.com
Thu Jan 18 18:42:18 UTC 2024
Hi Christoph,
> Warning, the output buffering done by delayer can easily cause some
> confusion.
I was a bit mistaken by that. Thanks for having taken the time to
verify how that works.
> Good news, a stand-alone test is very easy to do. For better visibility,
> I recommend the ts (timestamping) program as it prefixes each input line
> with a timestamp.
I did not know ts. Thanks for the pointer to it; I'll remember it and
will surely use it for future testing.
> $ (
> sleep 3 ; echo 'art1' ;
> sleep 56 ; echo 'art2' ;
> sleep 3 ; echo 'art3' ;
> sleep 58 ; echo 'EOF'
> ) | perl contrib/delayer.in --delay 60 --no-buffered -- ts -s
> 00:01:03 art1
> 00:01:59 art2
> 00:02:00 art3
> 00:02:00 EOF
>
> The first two lines are delayed by 60 seconds as desired, the third not
> because everything is flushed at end of input.
That's fine.
> Also, it's not necessary to have another input to trigger output, that
> was a misunterstanding on my side. So please drop the lines
>
> +Still a line is not sent to output until another line is read from the
> +input.
OK, I'll remove that sentence.
--
Julien ÉLIE
« Personnellement, j'adore passer du temps à ne rien faire ; mais pas
n'importe quand. »
More information about the inn-workers
mailing list