def METHOD_NAME(self, ttl, pipeline=None):
    """Save result data to Redis"""
    key = self.get_key(self.job_id)
    connection = pipeline if pipeline is not None else self.connection
    # result = connection.zadd(key, {self.serialize(): self.created_at.timestamp()})
    result = connection.xadd(key, self.serialize(), maxlen=10)
    # If xadd() is called in a pipeline, it returns a pipeline object instead of stream ID
    if pipeline is None:
        self.id = result.decode()
    if ttl is not None:
        if ttl == -1:
            connection.persist(key)
        else:
            connection.expire(key, ttl)
    return self.id