refactor: make sure promises are settled before app shutdown (#12942)

👍
This commit is contained in:
Kagami Sascha Rosylight
2024-01-08 04:28:13 +01:00
committed by GitHub
parent 145d28a8e4
commit 0c2118e963
9 changed files with 59 additions and 30 deletions

View File

@@ -28,6 +28,7 @@ import { UserBlockingService } from '@/core/UserBlockingService.js';
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
import { RoleService } from '@/core/RoleService.js';
import { FeaturedService } from '@/core/FeaturedService.js';
import { trackPromise } from '@/misc/promise-tracker.js';
const FALLBACK = '❤';
const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16;
@@ -268,7 +269,7 @@ export class ReactionService {
}
}
dm.execute();
trackPromise(dm.execute());
}
//#endregion
}
@@ -316,7 +317,7 @@ export class ReactionService {
dm.addDirectRecipe(reactee as MiRemoteUser);
}
dm.addFollowersRecipe();
dm.execute();
trackPromise(dm.execute());
}
//#endregion
}