Skip to content

Commit

Permalink
don't crash when 0 operations are in queue on exit (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkasprzyk committed May 19, 2021
1 parent c6da4ef commit 4a4623e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _wait_for_queue_empty(self, initial_queue_size: int, seconds: Optional[float
self._queue.wait_for_empty(wait_time)
size_remaining = self._queue.size()
already_synced = initial_queue_size - size_remaining
already_synced_proc = (already_synced / initial_queue_size) * 100
already_synced_proc = (already_synced / initial_queue_size) * 100 if initial_queue_size else 100
if size_remaining == 0:
click.echo(f"All {initial_queue_size} operations synced, thanks for waiting!")
return
Expand Down

0 comments on commit 4a4623e

Please sign in to comment.