code: def publish(self):
          
          while not self.ws.closed:
              # Sleep to prevent *constant* context-switches.
              gevent.sleep(self.lag_tolerance_secs)
              message = self.ws.receive()
              if message is not None:
                  channel_name, data = message.split(":", 1)
                  redis_conn.publish(channel_name, data)
docs: Relay messages from client to redis.