Browse Source

[IMP] remove note about unsupported feature

pull/303/head
Holger Brunn 9 years ago
parent
commit
ee22f16f7e
  1. 5
      dead_mans_switch_client/__openerp__.py
  2. 6
      dead_mans_switch_client/models/dead_mans_switch_client.py

5
dead_mans_switch_client/__openerp__.py

@ -25,10 +25,7 @@ controller, usually of the form https://your.server/dead_mans_switch/alive
This module attempts to send CPU and RAM statistics to the server. While this
is not mandatory, it's helpful for assessing a server's health. If you want
this, you need to install `psutil`.
You can also have the currently online users logged, but this only works if
the `im_chat` module is installed.""",
this, you need to install `psutil`.""",
"depends": [
'base',
],

6
dead_mans_switch_client/models/dead_mans_switch_client.py

@ -36,14 +36,18 @@ class DeadMansSwitchClient(orm.AbstractModel):
for process in processes:
if hasattr(process, 'memory_percent'):
ram += process.memory_percent()
else:
ram = None
if hasattr(process, 'cpu_percent'):
cpu += process.cpu_percent()
else:
cpu = None
return {
'database_uuid': self.pool['ir.config_parameter'].get_param(
cr, uid, 'database.uuid', context=context),
'cpu': cpu,
'ram': ram,
'user_count': 0,
'user_count': None,
}
def alive(self, cr, uid, context=None):

Loading…
Cancel
Save