I am running a pretty simple flask app. Customer scans a QR code, it sends an email to our ticketing system, and a webhook message out to teams, then it renders a basic HTML page saying someone is on their way.
(not the actual route config just a bum example)
approute /blah:()
webhook()
email()
return index.html
Is how it currently is, but that causes the HTML to not render until the e-mail is sent which makes it appear as if the site isn't working at least momentarily. If I move the return line above the function calls, it ONLY renders the HTML and doesn't execute the functions. What is the right way to go about rendering the HTML either first, or rendering it while the functions execute? I just need the website to do everything its already doing but faster.