# HG changeset patch # User Mads Kiilerich # Date 1364997372 -7200 # Node ID 76ae40e514eb5b773de8082f31702d476f57c601 # Parent 24e24661c0eba7be93f0e9dc3a35ea314d28ed60 config: automatically assign instance_id for host and process if it has been set to * It is no longer a problem to invent new instance_ids on startup - unused keys will be deleted. diff -r 24e24661c0eb -r 76ae40e514eb rhodecode/config/environment.py --- a/rhodecode/config/environment.py Tue Apr 02 19:01:25 2013 +0200 +++ b/rhodecode/config/environment.py Wed Apr 03 15:56:12 2013 +0200 @@ -101,6 +101,12 @@ set_available_permissions(config) config['base_path'] = repos_path set_rhodecode_config(config) + + instance_id = rhodecode.CONFIG.get('instance_id') + if instance_id == '*': + instance_id = '%s-%s' % (os.uname()[1], os.getpid()) + rhodecode.CONFIG['instance_id'] = instance_id + # CONFIGURATION OPTIONS HERE (note: all config options will override # any Pylons config options)