fix the latest time memory store

This commit is contained in:
Damodar Lohani 2022-09-09 07:52:57 +00:00
parent 0a9a84e357
commit 87e3916568

View file

@ -323,7 +323,6 @@ class TimeSeries extends Calculator
$document->setAttribute('value', $value)
);
}
$this->latestTime[$metric][$period] = $time;
} catch (\Exception $e) { // if projects are deleted this might fail
if (is_callable($this->errorHandler)) {
call_user_func($this->errorHandler, $e, "sync_project_{$projectId}_metric_{$metric}");
@ -397,6 +396,7 @@ class TimeSeries extends Calculator
$value,
0
);
$this->latestTime[$metric][$period['key']] = $point['time'];
}
}
} catch (\Exception $e) { // if projects are deleted this might fail