Mercurial > kallithea
view init.d/kallithea-upstart.conf @ 8286:4aa6a17afc49
validators: don't catch all Exceptions as invalid clone URIs, be specific
When adding a new repository with a remote clone URI, the URI will be
validated in some way. Several exceptions could occur during that
validation.
Previously, the code would catch based on 'Exception', which means that
_any_ exception would cause the URI to be found invalid. This means that
errors in the code (e.g. related to Python 3 conversion) were also
categorized as 'invalid clone URI'. And thus, the tests that test an
actually invalid URI would pass, even though there was a bug.
Now, things have been refactored so it only is relevant to catch
InvalidCloneUriException. Any other exception will now yield a 500 Internal
Server Error, as expected.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sun, 01 Mar 2020 21:40:32 +0100 |
parents | 2c3d30095d5e |
children |
line wrap: on
line source
# kallithea - run the kallithea daemon as an upstart job # Change variables/paths as necessary and place file /etc/init/kallithea.conf # start/stop/restart as normal upstart job (ie: $ start kallithea) description "Kallithea Mercurial Server" author "Matt Zuba <matt.zuba@goodwillaz.org" start on (local-filesystems and runlevel [2345]) stop on runlevel [!2345] respawn umask 0022 env PIDFILE=/var/hg/kallithea/kallithea.pid env LOGFILE=/var/hg/kallithea/log/kallithea.log env APPINI=/var/hg/kallithea/production.ini env HOME=/var/hg env USER=hg env GROUP=hg exec /var/hg/.virtualenvs/kallithea/bin/gearbox serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE -c $APPINI post-stop script rm -f $PIDFILE end script