mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Only sleep if there is more work to be done
(imported from commit f8a1380e0045c9470909c088a9d262f8a714c86e)
This commit is contained in:
@@ -18,4 +18,6 @@ def run_in_batches(all_list, batch_size, callback, sleep_time = 0, logger = None
|
||||
logger("Executing %s in batch %s of %s" % (end-start, i+1, limit))
|
||||
|
||||
callback(batch)
|
||||
sleep(sleep_time)
|
||||
|
||||
if i != limit - 1:
|
||||
sleep(sleep_time)
|
||||
|
||||
Reference in New Issue
Block a user