Skip to content

Commit

Permalink
[core] Loading configs before processing aggregated data regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
Cookiezaurs committed Nov 25, 2024
1 parent 1309cae commit c549e3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/scripts/fix-data/regenerate_aggregated_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("
query._id = {$in: appList.map(app_id=>common.db.ObjectID(app_id))};
}
const apps = await countlyDb.collection("apps").find(query, {_id: 1, name: 1, timezone: 1}).toArray();

await new Promise((resolve)=>{
common.plugins.loadConfigs(countlyDb, function() {
resolve();
});
});
if (!apps || !apps.length) {
return close();
}
Expand Down

0 comments on commit c549e3d

Please sign in to comment.