fix bug
Some checks failed
deploy / deploy (push) Failing after 24s

This commit is contained in:
Lee 2023-10-30 15:03:29 +00:00
parent f9021413d4
commit a19cf7e448

@ -152,14 +152,27 @@ async function updateAverages() {
// create the point and write it to influx
const point = new Point("scoresaber")
.tag("type", "average")
.floatField("acc", average.acc)
.floatField("pp", average.pp)
.floatField("stars", average.stars)
.floatField("badCuts", average.mistakes.badCuts)
.floatField("missed", average.mistakes.missed)
.floatField("rank", average.rank)
.floatField("maxCombo", average.maxCombo)
.timestamp(new Date());
if (average.acc) {
point.floatField("acc", average.acc);
}
if (average.pp) {
point.floatField("pp", average.pp);
}
if (average.stars) {
point.floatField("stars", average.stars);
}
if (average.mistakes) {
point.intField("badCuts", average.mistakes.badCuts);
point.intField("missed", average.mistakes.missed);
}
if (average.rank) {
point.intField("rank", average.rank);
}
if (average.maxCombo) {
point.intField("maxCombo", average.maxCombo);
}
InfluxWriteAPI.writePoint(point);
console.log(`Updated averages in ${new Date().getTime() - before}ms`);
});