From dbd64457f5cbfc3307e54deb6cb1b9b86c73680c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Fri, 21 Jun 2024 11:29:04 +0200 Subject: [PATCH] Slight output improvement in the progressbar-based commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- datanommer.commands/datanommer/commands/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datanommer.commands/datanommer/commands/utils.py b/datanommer.commands/datanommer/commands/utils.py index 31fc730d7..1e5887aba 100644 --- a/datanommer.commands/datanommer/commands/utils.py +++ b/datanommer.commands/datanommer/commands/utils.py @@ -48,6 +48,8 @@ def iterate_over_messages(query, start, chunk_size): chunk_start = start first_run = True while has_messages: + if bar.is_hidden: + click.echo(f"Working on {chunk_size} messages sent after {chunk_start}") chunk_query = query.where(m.Message.timestamp >= chunk_start).limit(chunk_size) if not first_run: chunk_query = chunk_query.offset(1)