Skip to content

Commit

Permalink
🐛queue_cursor should not be reset
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Oct 23, 2024
1 parent b80fdc0 commit 722179c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/learn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 722179c

Please sign in to comment.