feat: add new rule for floating promise (#2726)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-06-08 17:54:25 +08:00
committed by GitHub
parent fda89b05e7
commit bedf838fe5
45 changed files with 221 additions and 134 deletions
@@ -11,6 +11,7 @@ import {
merge,
} from 'rxjs';
import {
concatMap,
distinctUntilChanged,
filter,
ignoreElements,
@@ -126,10 +127,8 @@ function startPollingSecondaryDB(db: WorkspaceSQLiteDB) {
switchMap(secondaryDB => {
return interval(300000).pipe(
startWith(0),
concatMap(() => secondaryDB.pull()),
tap({
next: () => {
secondaryDB.pull();
},
error: err => {
logger.error(`[ensureSQLiteDB] polling secondary db error`, err);
},