def execute(self, work_iterable, work_handler): for batch in dynamic_batch_iterator(work_iterable, lambda: self.batch_size): self.executor.submit(self._fail_safe_execute, work_handler, batch)
def execute(self, work_iterable, work_handler, total_items=None): self.progress_logger.start(total_items=total_items) for batch in dynamic_batch_iterator(work_iterable, lambda: self.batch_size): self.executor.submit(self._fail_safe_execute, work_handler, batch)