From ef2b324eedb55c36be3bff797a45f6309df2c9b3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 25 Jun 2019 11:03:50 -0400 Subject: [PATCH] Flush csv output per row Improve responsiveness of csv output when piping --- confluent_client/bin/nodesensors | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_client/bin/nodesensors b/confluent_client/bin/nodesensors index e719bfa2..05a433a8 100755 --- a/confluent_client/bin/nodesensors +++ b/confluent_client/bin/nodesensors @@ -185,6 +185,7 @@ def format_csv(csvwriter, orderedsensors, resdata, showtime=True): except KeyError: rowdata.append('N/A') csvwriter.writerow(rowdata) + sys.stdout.flush() def main():