Skip to content

Instantly share code, notes, and snippets.

@ultrabug
Created November 2, 2015 17:44
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 ultrabug/e863a7c7b1221b5e0783 to your computer and use it in GitHub Desktop.
Save ultrabug/e863a7c7b1221b5e0783 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from flask import Flask
from time import sleep
import uwsgi
app = Flask(__name__)
@app.route('/')
def cheap_me_maybe():
"""
"""
sleep(0.1)
return "OK"
def graceful_reload():
"""
"""
print('I got gracefully reloaded')
uwsgi.atexit = graceful_reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment