unit/test/python/atexit/wsgi.py
Max Romanov 1bb22d1e92 Unit application library.
Library now used in all language modules.
Old 'nxt_app_*' code removed.

See src/test/nxt_unit_app_test.c for usage sample.
2018-08-06 17:27:33 +03:00

11 lines
271 B
Python

import atexit
def application(environ, start_response):
def at_exit():
environ['wsgi.errors'].write('At exit called.\n')
environ['wsgi.errors'].flush()
atexit.register(at_exit)
start_response('200', [('Content-Length', '0')])
return []