diff --git a/core/learn/schema.py b/core/learn/schema.py index 6286c95..b263813 100644 --- a/core/learn/schema.py +++ b/core/learn/schema.py @@ -389,11 +389,13 @@ def _poll(self, cursor: int) -> Any: def _handle_exception(self, pack: AsyncExceptionPack) -> Any: if pack.e is not None: console.error(f"trying to recover from error: {pack.e}") + queue_cursor = self._queue_cursor to_re_submit = (self._queue or []) + [pack] self._cleanup() self._initialize() for re_submit in to_re_submit: self._pool.submit(self._async_submit, re_submit.cursor, re_submit.index) + self._queue_cursor = queue_cursor return self._poll(pack.cursor)