WIFI-3216 using currentMillis() rather than 0

This commit is contained in:
Kareem Dabbour
2021-07-22 17:39:14 -04:00
committed by Mike Hansen
parent 27f406a615
commit d026266bfa

View File

@@ -209,10 +209,10 @@ public class MqttStatsPublisher implements StatsPublisherInterface {
if (!metricRecordList.isEmpty()) { if (!metricRecordList.isEmpty()) {
long serviceMetricTimestamp = System.currentTimeMillis(); long serviceMetricTimestamp = System.currentTimeMillis();
metricRecordList.stream().forEach(smr -> { metricRecordList.stream().forEach(smr -> {
// TODO use serviceMetricTimestamp rather than 0. This is done for now since there are some // TODO use serviceMetricTimestamp instead. This is done for now since there are some
// channel metrics that have overlapping keys which messes up Cassandra if the same time stamp // channel metrics that have overlapping keys which messes up Cassandra if the same time stamp
// is used and setting it to 0 allows the CloudEventDispatcherController to assign unique time stamps. // is used. This should allow for unique time stamps.
smr.setCreatedTimestamp(0); smr.setCreatedTimestamp(System.currentTimeMillis());
if (smr.getLocationId() == 0) if (smr.getLocationId() == 0)
smr.setLocationId(locationId); smr.setLocationId(locationId);
if (smr.getCustomerId() == 0) if (smr.getCustomerId() == 0)