# HG changeset patch # User Marcin Kuzminski # Date 2017-02-23 19:17:40 # Node ID 1f27d629aa799e09d6f92ab76c561c2df9ba1d8e # Parent af7abb96343eefe9879a8fb561f2fbeb063ada14 system-info: added info about workers and worker type. diff --git a/rhodecode/admin/views/system_info.py b/rhodecode/admin/views/system_info.py --- a/rhodecode/admin/views/system_info.py +++ b/rhodecode/admin/views/system_info.py @@ -107,6 +107,8 @@ class AdminSystemInfoSettingsView(AdminS (_('RhodeCode Server IP'), val('server')['server_ip'], state('server')), (_('RhodeCode Server ID'), val('server')['server_id'], state('server')), (_('RhodeCode Configuration'), val('rhodecode_config')['path'], state('rhodecode_config')), + (_('Workers'), val('rhodecode_config')['config']['server:main'].get('workers', '?'), state('rhodecode_config')), + (_('Worker Type'), val('rhodecode_config')['config']['server:main'].get('worker_class', 'sync'), state('rhodecode_config')), ('', '', ''), # spacer # Database diff --git a/rhodecode/lib/system_info.py b/rhodecode/lib/system_info.py --- a/rhodecode/lib/system_info.py +++ b/rhodecode/lib/system_info.py @@ -520,9 +520,22 @@ def rhodecode_app_info(): def rhodecode_config(): import rhodecode + import ConfigParser path = rhodecode.CONFIG.get('__file__') rhodecode_ini_safe = rhodecode.CONFIG.copy() + try: + config = ConfigParser.ConfigParser() + config.read(path) + parsed_ini = config + if parsed_ini.has_section('server:main'): + parsed_ini = dict(parsed_ini.items('server:main')) + except Exception: + log.exception('Failed to read .ini file for display') + parsed_ini = {} + + rhodecode_ini_safe['server:main'] = parsed_ini + blacklist = [ 'rhodecode_license_key', 'routes.map',