FormatConverter: ensure we don't get stalled due to stdout buffer flood

this can happen due to very noisy outputs during conversion, e.g. if there were many unknown blocks.
This commit is contained in:
Dylan K. Taylor 2024-12-21 17:43:59 +00:00
parent 6a1d80e021
commit ada3acdba4
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -33,6 +33,7 @@ use function basename;
use function crc32;
use function file_exists;
use function floor;
use function flush;
use function microtime;
use function mkdir;
use function random_bytes;
@ -150,6 +151,7 @@ class FormatConverter{
$diff = $time - $thisRound;
$thisRound = $time;
$this->logger->info("Converted $counter / $count chunks (" . floor($this->chunksPerProgressUpdate / $diff) . " chunks/sec)");
flush();
}
}
$total = microtime(true) - $start;