diff options
author | Unbit <info@unbit.it> | 2013-12-26 17:42:28 +0100 |
---|---|---|
committer | Unbit <info@unbit.it> | 2013-12-26 17:42:28 +0100 |
commit | c153c26c18a2f9373aece533cb4f4bd0ed788e3c (patch) | |
tree | ec47b80a3757a64813377c2303fa10a8e9e782be /examples | |
parent | 82f5d1f988f8d5c679c4db8ef24f7c4e6645388e (diff) | |
download | uwsgi-c153c26c18a2f9373aece533cb4f4bd0ed788e3c.tar.gz |
fixed scripts/tests making use of dynamic options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/uwsgistatus.py | 10 | ||||
-rw-r--r-- | examples/welcome.py | 11 | ||||
-rw-r--r-- | examples/welcome3.py | 10 |
3 files changed, 0 insertions, 31 deletions
diff --git a/examples/uwsgistatus.py b/examples/uwsgistatus.py index f04dee7f..3b3b0851 100644 --- a/examples/uwsgistatus.py +++ b/examples/uwsgistatus.py @@ -42,16 +42,6 @@ def application(env, start_response): yield '<h2>dynamic options</h2>' - yield '<b>logging</b>: ' + str(uwsgi.get_option(0)) + '<br/>' - yield '<b>max_requests</b>: ' + str(uwsgi.getoption(1)) + '<br/>' - yield '<b>socket_timeout</b>: ' + str(uwsgi.getoption(2)) + '<br/>' - yield '<b>memory_debug</b>: ' + str(uwsgi.getoption(3)) + '<br/>' - yield '<b>master_interval</b>: ' + str(uwsgi.getoption(4)) + '<br/>' - yield '<b>harakiri</b>: ' + str(uwsgi.getoption(5)) + '<br/>' - yield '<b>cgi_mode</b>: ' + str(uwsgi.get_option(6)) + '<br/>' - yield '<b>threads</b>: ' + str(uwsgi.get_option(7)) + '<br/>' - yield '<b>process_reaper</b>: ' + str(uwsgi.get_option(8)) + '<br/>' - yield '<table border="1">' yield '<th>worker id</th><th>pid</th><th>in request</th><th>requests</th><th>running time</th><th>address space</th><th>rss</th>' diff --git a/examples/welcome.py b/examples/welcome.py index dc898292..8db7af64 100644 --- a/examples/welcome.py +++ b/examples/welcome.py @@ -47,11 +47,6 @@ def serve_logo(e, sr): uwsgi.sendfile('logo_uWSGI.png') return '' -def serve_options(e, sr): - sr('200 OK', [('Content-Type', 'text/html')]) - for opt in range(0,256): - yield "<b>%d</b> = %d<br/>" % (opt, uwsgi.get_option(opt)) - def serve_config(e, sr): sr('200 OK', [('Content-Type', 'text/html')]) for opt in uwsgi.opt.keys(): @@ -61,7 +56,6 @@ routes = {} routes['/xsendfile'] = xsendfile routes['/logo'] = serve_logo routes['/config'] = serve_config -routes['/options'] = serve_options @postfork def setprocname(): @@ -120,11 +114,6 @@ Configuration<br/> <iframe src="/config"></iframe><br/> <br/> - -Dynamic options<br/> -<iframe src="/options"></iframe><br/> - -<br/> Workers and applications<br/> <table border="1"> <tr> diff --git a/examples/welcome3.py b/examples/welcome3.py index 5b3608e1..6f5a9d13 100644 --- a/examples/welcome3.py +++ b/examples/welcome3.py @@ -9,12 +9,6 @@ def serve_logo(e, sr): sr('200 OK', [('Content-Type', 'image/png')]) return uwsgi.sendfile('logo_uWSGI.png') -def serve_options(e, sr): - sr('200 OK', [('Content-Type', 'text/html')]) - for opt in range(0,256): - body = "{opt} = {optvalue}<br/>".format(opt=opt, optvalue=uwsgi.get_option(opt)) - yield bytes(body.encode('ascii')) - def serve_config(e, sr): sr('200 OK', [('Content-Type', 'text/html')]) for opt in uwsgi.opt.keys(): @@ -25,7 +19,6 @@ routes = {} routes['/xsendfile'] = xsendfile routes['/logo'] = serve_logo routes['/config'] = serve_config -routes['/options'] = serve_options def application(env, start_response): @@ -43,9 +36,6 @@ Configuration<br/> <br/> -Dynamic options<br/> -<iframe src="/options"></iframe><br/> - """.format(version=uwsgi.version.decode('ascii')) return bytes(body.encode('ascii')) |