Im using Django Channels (and loving it) but new consumers to the layer only see data from the time they join into the future. Is there a way for new consumers to see previous data belonging to the layer?
Asked
Active
Viewed 66 times
1 Answers
0
You need to send the existing data either from something like the database or the cache. Do this on the connect method of the consumer. If you are using async methods you must always use an async library for IO or wrap the IO in sync_to_async or database_sync_to_async. This is so you don't block the event loop.

kagronick
- 2,552
- 1
- 24
- 29