Cleaned up Promise

f_influx-checks
Ruakij 3 years ago
parent bb3d843895
commit d7a9530b68

@ -25,10 +25,8 @@ class InfluxPointWriter extends Writable{
_flush(next){ _flush(next){
this._api.flush(true) this._api.flush(true)
.then( .catch((err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); })
next, .then(next);
(err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); }
);
} }
} }

Loading…
Cancel
Save