diff --git a/README b/README index dc504fa3154229f7b7218c435b20171472b53178..1390caec4c4de2fb6a20c477ef9d13f1e4155c70 100644 --- a/README +++ b/README @@ -76,6 +76,7 @@ Todo list: cannot be multiple workers without synchronisation problems. Good read: http://news.ycombinator.com/item?id=3002861 Suggestion: http://celeryproject.org/ +- Have a normal 404 page. Code style guide: - Follow PEP 8 (code) and PEP 257 (docstrings). diff --git a/extras/apache/mutalyzer.conf b/extras/apache/mutalyzer.conf index 566b1ad5ecc09d38ab203d8573c23495c0b3a126..67b8fd172b8db0b7c501204449369ddd5e6e3c5d 100644 --- a/extras/apache/mutalyzer.conf +++ b/extras/apache/mutalyzer.conf @@ -7,6 +7,10 @@ Alias /mutalyzer/base /var/www/mutalyzer/base AllowOverride None </Directory> +# Use daemon mode of mod_wsgi +WSGIDaemonProcess mutalyzer processes=2 threads=15 maximum-requests=10000 +WSGIProcessGroup mutalyzer + # Webservice WSGIScriptAlias /mutalyzer/services <MUTALYZER_BIN_WEBSERVICE> <Directory /mutalyzer/services> diff --git a/extras/post-upgrade.sh b/extras/post-upgrade.sh index 15e00672e05556ae841283854a6944fd83b15852..37ae527a2e4f1f713cc99736caf6e926a4b4991e 100644 --- a/extras/post-upgrade.sh +++ b/extras/post-upgrade.sh @@ -21,6 +21,8 @@ COLOR_END='\033[0m' # The 'cd /' is a hack to prevent the mutalyzer package under the current # directory to be used. PACKAGE_ROOT=$(cd / && python -c 'import mutalyzer; print mutalyzer.package_root()') +BIN_WEBSITE=$(which mutalyzer-website.wsgi) +BIN_WEBSERVICE=$(which mutalyzer-webservice.wsgi) if [ ! -e /var/www/mutalyzer ]; then mkdir -p /var/www/mutalyzer @@ -40,8 +42,12 @@ for MIGRATION in extras/migrations/*.migration; do $MIGRATION migrate done -echo "Restarting Apache" -/etc/init.d/apache2 restart +echo -e "${COLOR_INFO}Assuming mod_wsgi daemon mode, not restarting Apache${COLOR_END}" +#/etc/init.d/apache2 restart + +echo "Touching WSGI entry to reload application" +touch $BIN_WEBSITE +touch $BIN_WEBSERVICE echo "Restarting Mutalyzer batch daemon" /etc/init.d/mutalyzer-batchd restart