def event_stream(request):
    """
    Stream worker events out to browser.
    """
return events.SSEResponse(settings.EVENTS_PUBSUB_URL, channels=[settings.
    EVENTS_PUBSUB_CHANNEL], buffer_key=settings.EVENTS_BUFFER_KEY,
    last_event_id=request.META.get('HTTP_LAST_EVENT_ID'))
Django: Cleaning up redis connection after client disconnects from stream