Mercurial > kallithea
changeset 5534:55ccfc66479d
cache: make instance_id = * the default and deprecate it
Auto assigning instance_id's works perfectly fine now when the clean-up issue
has been resolved.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 08 Oct 2015 23:21:58 +0200 |
parents | aa1891074dd6 |
children | 93dca58eed34 |
files | development.ini docs/setup.rst docs/usage/performance.rst kallithea/bin/template.ini.mako kallithea/config/deployment.ini_tmpl kallithea/config/environment.py kallithea/tests/test.ini |
diffstat | 7 files changed, 1 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Thu Oct 08 23:21:58 2015 +0200 +++ b/development.ini Thu Oct 08 23:21:58 2015 +0200 @@ -280,12 +280,6 @@ #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden
--- a/docs/setup.rst Thu Oct 08 23:21:58 2015 +0200 +++ b/docs/setup.rst Thu Oct 08 23:21:58 2015 +0200 @@ -746,11 +746,6 @@ When running apache as root, please make sure it doesn't run Kallithea as root, for examply by adding: ``user=www-data group=www-data`` to the configuration. -.. note:: - If running Kallithea in multiprocess mode, - make sure you set ``instance_id = *`` in the configuration so each process - gets it's own cache invalidation key. - Example WSGI dispatch script: .. code-block:: python
--- a/docs/usage/performance.rst Thu Oct 08 23:21:58 2015 +0200 +++ b/docs/usage/performance.rst Thu Oct 08 23:21:58 2015 +0200 @@ -38,7 +38,6 @@ scaled horizontally on one (recommended) or multiple machines. In order to scale horizontally you need to do the following: - - Each instance needs its own .ini file and unique ``instance_id`` set. - Each instance's ``data`` storage needs to be configured to be stored on a shared disk storage, preferably together with repositories. This ``data`` dir contains template caches, sessions, whoosh index and is used for
--- a/kallithea/bin/template.ini.mako Thu Oct 08 23:21:58 2015 +0200 +++ b/kallithea/bin/template.ini.mako Thu Oct 08 23:21:58 2015 +0200 @@ -278,12 +278,6 @@ #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -<%text>## instance-id prefix</%text> -<%text>## a prefix key for this instance used for cache invalidation when running</%text> -<%text>## multiple instances of kallithea, make sure it's globally unique for</%text> -<%text>## all running kallithea instances. Leave empty if you don't use it</%text> -instance_id = - <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text> <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text> <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
--- a/kallithea/config/deployment.ini_tmpl Thu Oct 08 23:21:58 2015 +0200 +++ b/kallithea/config/deployment.ini_tmpl Thu Oct 08 23:21:58 2015 +0200 @@ -274,12 +274,6 @@ #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden
--- a/kallithea/config/environment.py Thu Oct 08 23:21:58 2015 +0200 +++ b/kallithea/config/environment.py Thu Oct 08 23:21:58 2015 +0200 @@ -118,7 +118,7 @@ config['base_path'] = repos_path set_app_settings(config) - instance_id = kallithea.CONFIG.get('instance_id') + instance_id = kallithea.CONFIG.get('instance_id', '*') if instance_id == '*': instance_id = '%s-%s' % (platform.uname()[1], os.getpid()) kallithea.CONFIG['instance_id'] = instance_id
--- a/kallithea/tests/test.ini Thu Oct 08 23:21:58 2015 +0200 +++ b/kallithea/tests/test.ini Thu Oct 08 23:21:58 2015 +0200 @@ -280,12 +280,6 @@ #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden