Shuffle accounts when updating all of them
This commit is contained in:
parent
b3103c22c5
commit
2c60e2102a
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue