Changeset - 76ae40e514eb
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-04-03 15:56:12
madski@unity3d.com
Grafted from: d091c31cb65c
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.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/environment.py
Show inline comments
 
@@ -101,6 +101,12 @@ def load_environment(global_conf, app_co
 
    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)
 

	
0 comments (0 inline, 0 general)