diff --git a/igmirror.py b/igmirror.py index 0b6c81d..0514021 100644 --- a/igmirror.py +++ b/igmirror.py @@ -83,7 +83,9 @@ def update_allaccounts_async(): def update_allaccounts(): # update all accounts with a timeout of 20 seconds sleeptime = int(config()['timeout_btw_accounts']) - for acc_id in os.listdir('./db/accounts'): + accounts = os.listdir('./db/accounts') + random.shuffle(accounts) + for acc_id in accounts: print('I| mirroring account "{}"...'.format(acc_id)) update_igaccount(acc_id) print('I| timeout {} seconds'.format(sleeptime))