Files
uwsgi/tests/sleeping_async.py
T
2012-03-07 15:06:38 +01:00

10 lines
294 B
Python

import uwsgi
sleepvalue = 5
def application(env, start_response):
start_response('200 Ok', [('Content-type', 'text/html')])
yield uwsgi.async_sleep(sleepvalue)
#print "TIMEOUT: ", env['x-wsgiorg.fdevent.timeout']
yield "<h1>Hello World after %d seconds</h1>" % sleepvalue