1

I have a flask endpoint "/progress" which checks for values in DB for progress to be displayed in the frontend. This endpoint is continuously called until the progress becomes 100%.

@app.route("/progress")

def check_progress():

    # function returns the current progress from DB
    progress_in_percentage = progress_value()

    return progress_in_percentage


@app.route("/home_page")

def load_home_page_details():
    # funtion return the users home page projects from DB
    home = load_projects_home()

    return home

The problem arises when the user accidentally closes the browser where the calculation was happening and open the page application again. The Flask shutdowns the progress process and loads the home page.

How can I retain the progress process even after the user closes the browser come backs to the page ? Plus the solution should be scalable for many users.

I am using python3.7 in the backend and Flask to serve the requests.

Danish Xavier
  • 1,225
  • 1
  • 10
  • 21

0 Answers0