2
0
Fork 0

fix(notify): output spacing
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2024-05-12 22:16:16 +02:00
parent 69c9faa4bc
commit f03542b584
1 changed files with 5 additions and 11 deletions

View File

@ -89,31 +89,25 @@ class Command(BaseCommand):
return return
self.stderr.write()
all_messages = set(messages) all_messages = set(messages)
sent_messages = set() sent_messages = set()
self.stderr.write(
self.style.SUCCESS(
f"{'0'.rjust(len(str(len(all_messages))))} / {len(all_messages)}"
),
ending="",
)
error = None error = None
try: try:
for message in send(all_messages): for message in send(all_messages):
sent_messages.add(message) sent_messages.add(message)
self.stderr.write()
self.stderr.write( self.stderr.write(
self.style.SUCCESS( self.style.SUCCESS(
f"\r{str(len(sent_messages)).rjust(len(str(len(all_messages))))} / {len(all_messages)}" f"\r{str(len(sent_messages)).rjust(len(str(len(all_messages))))} / {len(all_messages)}"
),
ending="",
) )
)
self.stderr.write()
except Exception as e: except Exception as e:
error = e error = e
self.stderr.write()
self.stderr.write( self.stderr.write(
self.style.WARNING(f"sent {len(sent_messages)} out of {len(all_messages)}") self.style.WARNING(f"sent {len(sent_messages)} out of {len(all_messages)}")
) )