You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Same as simple find, but I want to wait until new documents come in.
This will be useful, for example, for implementing event notifications over websocket.
Something like that:
async for rec of engine.find(EventsModel, EventsModel.timestamp >= datetime.utcnow().timestamp(), tailable=True):
await websocket.send(dict(rec))
Support for tailable cursors in engine.find call:
https://motor.readthedocs.io/en/stable/examples/tailable-cursors.html
The text was updated successfully, but these errors were encountered: