Fixes hosts top optimize.

This commit is contained in:
wescoeur 2016-03-09 17:29:57 +01:00
parent 39b0ea381b
commit aa117a0ee3

View File

@ -265,6 +265,7 @@ class Plan {
// No ressource's utilization problem.
if (toOptimize.length === 0) {
debug('No hosts to optimize.')
return
}
@ -379,7 +380,8 @@ class PerformancePlan extends Plan {
async execute () {
const data = await this._findHostsToOptimize()
if (!hosts) {
if (!data) {
debug('No hosts to optimize.')
return
}