Commit 64c80ba6 authored by Daniele Venzano's avatar Daniele Venzano

Get second-to-last value from influxdb to work around empty time buckets

parent 93890574
Pipeline #11136 passed with stages
in 2 minutes and 22 seconds
# Zoe Changelog
## Version 2018.12
* Implement a disabled label that lets admins disable hosts for maintenance reasons
* Support running behind a reverse proxy
* Option to get usage metrics from influxdb/telegraf
* Show termination reasons on the web interface
* GitLab authentication via OAuth2
* Add a PAM login option
* Implement alternative to websockets for log streaming to the web interface
* Implement users, roles and quotas
* Implement pagination for the execution list
* Implement RANDOM and WATERFILL placement policies
* Dynamic job size calculation lets prevents starvation of jobs waiting in the queue
* Perform synchronous termination at the end of the scheduler loop to prevent race conditions
* Removed deprecated features: Swarm back-end and the simple scheduler
## Version 2017.12
* New Docker Engine back-end, the Swarm back-end is now deprecated
......
......@@ -15,7 +15,7 @@
"""Versions."""
ZOE_VERSION = '2018.11-beta'
ZOE_VERSION = '2018.12'
ZOE_API_VERSION = '0.7'
ZOE_APPLICATION_FORMAT_VERSION = 3
SQL_SCHEMA_VERSION = 7 # ---> Increment this value every time the SQL schema changes !!! <---
......@@ -47,7 +47,7 @@ class InfluxDBInMetrics:
cpu_results = data['results'][0]
assert cpu_results['statement_id'] == 0
if 'series' in cpu_results:
val = cpu_results['series'][0]['values'][0][1]
val = cpu_results['series'][0]['values'][1][1]
if val is None:
ret['cpu_usage'] = 0
else:
......@@ -58,7 +58,7 @@ class InfluxDBInMetrics:
mem_results = data['results'][1]
assert mem_results['statement_id'] == 1
if 'series' in mem_results:
val = mem_results['series'][0]['values'][0][1]
val = mem_results['series'][0]['values'][1][1]
if val is None:
ret['mem_usage'] = 0
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment