def emit_via_redis(event, message, room):
 r = get_redis_server()
 try:
  r.publish(u'events', frappe.as_json({u'event': event, u'message': message, u'room': room}))
 except redis.exceptions.ConnectionError:
  pass

def emit_via_redis ( event , message , room ) : r = get_redis_server ( ) try : r . publish ( u'events' , frappe . as_json ( { u'event' : event , u'message' : message , u'room' : room } ) ) except redis . exceptions . ConnectionError : pass
publish real-time updates via redis .