system-info: added info about workers and worker type.
This commit is contained in:
parent
475866e1b0
commit
64c3dbee7b
2 changed files with 15 additions and 0 deletions
|
|
@ -107,6 +107,8 @@ class AdminSystemInfoSettingsView(AdminSettingsView):
|
|||
(_('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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue