def delete_thread(thread_uid):
    pipe = content.pipeline()
    pipe.delete(build_key(THREAD_KEY, thread_uid))

    comments_key = build_key(THREAD_COMMENTS_KEY, thread_uid)
    for comment_uid in links.lrange(comments_key, 0, -1):
        pipe.delete(build_key(COMMENT_KEY, thread_uid, comment_uid))

    pipe.execute()

    with links.pipeline() as pipe:
        pipe.delete(comments_key)
        pipe.delete(build_key(THREAD_COUNTER_KEY, thread_uid))
        pipe.lrem(build_key(THREADS_KEY), 1, thread_uid)
        pipe.execute()

    return True
Delete thread and all its data from storages.
dataset/ETHPy150Open playpauseandstop/Flask-And-Redis/testapp/storage.py/delete_thread