Cleaned up Promise
This commit is contained in:
parent
bb3d843895
commit
d7a9530b68
@ -25,10 +25,8 @@ class InfluxPointWriter extends Writable{
|
||||
|
||||
_flush(next){
|
||||
this._api.flush(true)
|
||||
.then(
|
||||
next,
|
||||
(err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); }
|
||||
);
|
||||
.catch((err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); })
|
||||
.then(next);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user