Skip to content

Instantly share code, notes, and snippets.

@wooparadog
Created August 3, 2022 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wooparadog/647ff3e1d8c99c0f07767740fc23cbed to your computer and use it in GitHub Desktop.
Save wooparadog/647ff3e1d8c99c0f07767740fc23cbed to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
'''
DEMO: print stack in timeout
'''
from flask import Flask
import time
app = Flask(__name__)
def worker_abort(worker):
import traceback
traceback.print_stack()
@app.route("/")
def hello_world():
time.sleep(1000)
return "<p>Hello, World!</p>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment