From 5d6f4fc2dfc768174d7e4016b9f895f20af21cb6 Mon Sep 17 00:00:00 2001 From: Bofh Date: Thu, 11 Feb 2021 00:28:08 +0100 Subject: [PATCH] Add verbosity on mirror update process * We wanted to know the progess of the updates --- igmirror.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/igmirror.py b/igmirror.py index ab343d6..80acfd8 100644 --- a/igmirror.py +++ b/igmirror.py @@ -85,10 +85,12 @@ def update_allaccounts(): sleeptime = int(config()['timeout_btw_accounts']) accounts = os.listdir('./db/accounts') random.shuffle(accounts) + i = 0 for acc_id in accounts: + i += 1 print('I| mirroring account "{}"...'.format(acc_id)) update_igaccount(acc_id) - print('I| timeout {} seconds'.format(sleeptime)) + print('I| {} of {} completed. Waiting {} seconds'.format(i, len(accounts), sleeptime)) time.sleep(sleeptime) print() print('I| done updating all accounts')