INNER CODE UNIT · TypeScript
backgroundIndexCreationPromise
modelence/modelence · packages/modelence/src/app/index.ts:277
const backgroundIndexCreationPromise = (async () => {
for (const store of backgroundStores) {
await createStoreIndexes(store, 'create-only');
}
})();
const migrationPromise = runMigrations(migrations, { lockMode: 'skip' });
void Promise.allSettled([backgroundIndexCreationPromise, migrationPromise])
.then(([backgroundIndexesResult, migrationResult]) => {
if (backgroundIndexesResult.status === 'rejected') {
console.error('Error creating background indexes:', backgroundIndexesResult.reason);
}
if (migrationResult.status === 'rejected') {
console.error('Error running migrations:', migrationResult.reason);
}
})
.finally(async () => {