stephenmcd / django-socketio

WebSockets for Django
BSD 2-Clause "Simplified" License
1.32k stars 244 forks source link

Long running thread #97

Closed chrisspen closed 8 years ago

chrisspen commented 8 years ago

How would you incorporate a long-running thread that pushes events to the client?

I assume the thread would call socket.send_and_broadcast_channel(message), but what would be the best way to launch that thread so it would be ran by runserver_socketio?

I'm trying to create a simple monitoring application that reads server metrics and pushes these metrics to the client when they change. The chat example is great, but it's events are still triggered by the client, so it's unclear how a pure server-push example would work.

stephenmcd commented 8 years ago

Presumably answered yourself in #99