WIFI-3216 using 0 rather than currentMillis()

This commit is contained in:
Kareem Dabbour
2021-07-22 17:52:43 -04:00
parent b720f9882d
commit 9cc501a8b9

View File

@@ -209,10 +209,10 @@ public class MqttStatsPublisher implements StatsPublisherInterface {
if (!metricRecordList.isEmpty()) {
long serviceMetricTimestamp = System.currentTimeMillis();
metricRecordList.stream().forEach(smr -> {
// 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
// is used. This should allow for unique time stamps.
smr.setCreatedTimestamp(System.currentTimeMillis());
// TODO use serviceMetricTimestamp rather than 0. This is done for now since there are some
// 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.
smr.setCreatedTimestamp(0);
if (smr.getLocationId() == 0)
smr.setLocationId(locationId);
if (smr.getCustomerId() == 0)