earthcubeprojects-chords / chords

EarthCube CHORDS application code
GNU General Public License v2.0
25 stars 13 forks source link

Reset measurement count when cloning an instrument #606

Open MisterMartin opened 10 months ago

MisterMartin commented 10 months ago

The instrument measurement count is approximate, rather than being counted on demand. This is because it is very expensive to ask Influx to count the number of measurements. The count is a simply stored value which is updated every time a new measurement is added.

When an instrument configuration is cloned (to add a new instrument), all of the metadata is duplicated. This includes the measurement count, even though the existing data are not cloned.

Zero this value during the clone operation.