jortizcs / Pangia

Anomaly detection in buildings
greenpangia.com
Other
0 stars 0 forks source link

Non-determinism in alarms when charts are loaded #30

Open joelweinberger opened 11 years ago

joelweinberger commented 11 years ago

When charts are loaded, the alarms are showing up in a seemingly random order. @romain-fontugne seems to have a handle on why this is happening. @romain-fontugne, can you fill us in on that?

romain-fontugne commented 11 years ago

I guess this is due to the push at line 79 of routes/getalarms.js. This push adds in an array the alarms that will be displayed. To make it deterministic we should sort the alarms in the array in the same order as the results from mongodb.