From 81641686bcff322da1a84a6ba4b718ee58f89487 Mon Sep 17 00:00:00 2001 From: "roberto@maverick64" Date: Fri, 22 Apr 2011 08:51:29 +0200 Subject: [PATCH] various fixes --- buildconf/default.ini | 2 +- heavytest.ini | 5 ++++- heavytest.py | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 heavytest.py diff --git a/buildconf/default.ini b/buildconf/default.ini index b029d03c..609b961e 100644 --- a/buildconf/default.ini +++ b/buildconf/default.ini @@ -25,7 +25,7 @@ bin_name = uwsgi plugin_dir = . embedded_plugins = python, ping, cache, nagios, rpc, fastrouter, http, ugreen -locking = flock +locking = auto event = auto timer = auto filemonitor = auto diff --git a/heavytest.ini b/heavytest.ini index 94687ffa..e2c0e7d6 100644 --- a/heavytest.ini +++ b/heavytest.ini @@ -1,6 +1,6 @@ [uwsgi] -master = true +;master = true processes = 4 threads = 8 @@ -22,3 +22,6 @@ cache-blocksize = 98304 log-micros = true + +module = heavytest +mount = /cc=uwsgicc/__init__.py diff --git a/heavytest.py b/heavytest.py new file mode 100644 index 00000000..bcef7b6f --- /dev/null +++ b/heavytest.py @@ -0,0 +1,14 @@ +import uwsgi +import werkzeug.testapp + +uwsgi.cache_set("/cache/get", "HTTP 1.1 200 OK\r\nContent-Type: text/html\r\n\r\n

I am the uWSGI cache

") + +def app001(env, start_response): + start_response('200 OK', [('Content-Type', 'text/html')]) + return "PATH_INFO=%s" % env['PATH_INFO'] + +def app002(env, start_response): + start_response('200 OK', [('Content-Type', 'text/html')]) + return "requests: %d" % uwsgi.total_requests() + +uwsgi.applications = { '':werkzeug.testapp.test_app, '/app001':app001, '/app002':app002 }