Fix billing this hour bug.

This commit is contained in:
zhuyj17 2016-10-30 17:05:16 +08:00
parent ae5d9b9fd5
commit 2b5383dd76
3 changed files with 3 additions and 3 deletions

View File

@ -217,6 +217,7 @@ class Container_Collector(threading.Thread):
else:
basic_info['RunningTime'] = 0
basic_info['billing'] = 0
basic_info['billing_this_hour'] = 0
for part in parts:
if not part == '':
key_val = re.split(':',part)
@ -228,7 +229,6 @@ class Container_Collector(threading.Thread):
#if basic_exist:
# logger.info(workercinfo[container_name]['basic_info'])
if(info['State'] == 'STOPPED'):
basic_info['billing_this_hour'] = 0
workercinfo[container_name]['basic_info'] = basic_info
#logger.info(basic_info)
return False

View File

@ -87,7 +87,7 @@
<th>Mem Usage</th>
<th>Disk Usage</th>
<th>Total Billing</th>
<th>Billing This Hour</th>
<th>Billing This Running Hour</th>
<th>Summary</th>
</tr>
</thead>

View File

@ -46,7 +46,7 @@
<th>Mem Usage</th>
<th>Disk Usage</th>
<th>Total Billing</th>
<th>Billing This Hour</th>
<th>Billing This Running Hour</th>
</tr>
</thead>
<tbody>