def METHOD_NAME(self, data):
    retry = True
    while True:
        try:
            if not retry:
                self._redis_connect()
            return self.redis.publish(self.channel, pickle.dumps(data))
        except redis.exceptions.RedisError:
            if retry:
                logger.error('Cannot publish to redis... retrying')
                retry = False
            else:
                logger.error('Cannot publish to redis... giving up')
                break