@app.route('/results')
def add_results():
    task_id = request.args.get('tid')
    task = add.get_task(task_id)
    if not task:
        return redirect('/')
    result = task.return_value
    if not result:
        return redirect('/progress?tid=' + task_id)
    task.delete()
    # Redis can also be used to cache results
    return render_template('results.html', value=result)


# Errors
When poll_task indicates the task is done, the progress page redirects here using JavaScript.
dataset/ETHPy150Open joeyespo/hello-redis-tasks/hello_redis_tasks.py/add_results