Show More
@@ -26,6 +26,7 b' from pyramid.view import view_config' | |||||
26 |
|
26 | |||
27 | from rhodecode.apps._base import BaseAppView |
|
27 | from rhodecode.apps._base import BaseAppView | |
28 | from rhodecode.apps.admin.navigation import navigation_list |
|
28 | from rhodecode.apps.admin.navigation import navigation_list | |
|
29 | from rhodecode.lib import system_info | |||
29 | from rhodecode.lib.auth import ( |
|
30 | from rhodecode.lib.auth import ( | |
30 | LoginRequired, HasPermissionAllDecorator, CSRFRequired) |
|
31 | LoginRequired, HasPermissionAllDecorator, CSRFRequired) | |
31 | from rhodecode.lib.utils2 import safe_int, StrictAttributeDict |
|
32 | from rhodecode.lib.utils2 import safe_int, StrictAttributeDict | |
@@ -71,6 +72,16 b' class AdminProcessManagementView(BaseApp' | |||||
71 |
|
72 | |||
72 | return proc_list |
|
73 | return proc_list | |
73 |
|
74 | |||
|
75 | def get_workers(self): | |||
|
76 | workers = None | |||
|
77 | try: | |||
|
78 | rc_config = system_info.rhodecode_config().value['config'] | |||
|
79 | workers = rc_config['server:main'].get('workers') | |||
|
80 | except Exception: | |||
|
81 | pass | |||
|
82 | ||||
|
83 | return workers or '?' | |||
|
84 | ||||
74 | @LoginRequired() |
|
85 | @LoginRequired() | |
75 | @HasPermissionAllDecorator('hg.admin') |
|
86 | @HasPermissionAllDecorator('hg.admin') | |
76 | @view_config( |
|
87 | @view_config( | |
@@ -83,6 +94,7 b' class AdminProcessManagementView(BaseApp' | |||||
83 | c.active = 'process_management' |
|
94 | c.active = 'process_management' | |
84 | c.navlist = navigation_list(self.request) |
|
95 | c.navlist = navigation_list(self.request) | |
85 | c.gunicorn_processes = self.get_processes() |
|
96 | c.gunicorn_processes = self.get_processes() | |
|
97 | c.gunicorn_workers = self.get_workers() | |||
86 | return self._get_template_context(c) |
|
98 | return self._get_template_context(c) | |
87 |
|
99 | |||
88 | @LoginRequired() |
|
100 | @LoginRequired() |
@@ -14,6 +14,7 b'' | |||||
14 | </div> |
|
14 | </div> | |
15 | <div class="panel-body" id="app"> |
|
15 | <div class="panel-body" id="app"> | |
16 | <h3>List of Gunicorn processes on this machine</h3> |
|
16 | <h3>List of Gunicorn processes on this machine</h3> | |
|
17 | <p>RhodeCode workers set: ${c.gunicorn_workers}</p> | |||
17 | <% |
|
18 | <% | |
18 | def get_name(proc): |
|
19 | def get_name(proc): | |
19 | cmd = ' '.join(proc.cmdline()) |
|
20 | cmd = ' '.join(proc.cmdline()) |
General Comments 0
You need to be logged in to leave comments.
Login now