autogestion / pubgate

Lightweight ActivityPub federator
BSD 3-Clause "New" or "Revised" License
111 stars 9 forks source link

Fix asyncio.base_futures.InvalidStateError: invalid state #56

Open autogestion opened 4 years ago

autogestion commented 4 years ago

Occurs when there are to many queries to MongoDB when trying to build cache for ~100 elements in a row Marked as TODO in pubgate/db/cached.py


Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
  File "/.../p2/lib/python3.7/site-packages/motor/core.py", line 1542, in _on_started
    len(self.delegate._CommandCursor__data))
asyncio.base_futures.InvalidStateError: invalid state