Cleaned up Promise
This commit is contained in:
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…
x
Reference in New Issue
Block a user