Skip to content

Commit

Permalink
optional initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
leanmendoza committed Nov 19, 2024
1 parent cf7e301 commit cbe0c52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions content/src/ports/activeEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,14 @@ export function createActiveEntitiesComponent(
logger.info('Initializing active entities cache', {
entityTypes: cachedEntityntityTypes.map((t) => t.toString()).toString()
})
for (const entityType of cachedEntityntityTypes) {
await populateEntityType(database, entityType)
try {
for (const entityType of cachedEntityntityTypes) {
await populateEntityType(database, entityType)
}
logger.info('Active entities cache initialized')
} catch (error) {
logger.error('Error initializing active entities cache', { error })
}
logger.info('Active entities cache initialized')
}

function getAllCachedScenes() {
Expand Down

0 comments on commit cbe0c52

Please sign in to comment.