Files
uwsgi/staticfilesnmp.py
T
2010-10-26 06:43:40 +02:00

14 lines
339 B
Python

import uwsgi
counter = 0
uwsgi.snmp_set_counter64(1, counter)
def application(environ, start_response):
global counter
start_response('200 OK', [('Content-Type', 'image/png')])
fd = open('logo_uWSGI.png','r')
counter = counter+1
uwsgi.snmp_set_counter64(1, counter)
return environ['wsgi.file_wrapper'](fd, 4096)