bulltrackers-module 1.0.448 → 1.0.449
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -199,8 +199,8 @@ async function loadDailySocialPostInsights(config, deps, dateString) {
|
|
|
199
199
|
signedIn: {} // Map<UserId, Map<PostId, Data>> - For Signed-In Users
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
-
const PI_COL_NAME = config.piSocialCollectionName || 'pi_social_posts';
|
|
203
|
-
const SIGNED_IN_COL_NAME = config.signedInUserSocialCollection || '
|
|
202
|
+
const PI_COL_NAME = config.piSocialCollectionName || config.piSocialCollection || 'pi_social_posts';
|
|
203
|
+
const SIGNED_IN_COL_NAME = config.signedInUserSocialCollection || 'signed_in_users_social';
|
|
204
204
|
|
|
205
205
|
// 2. Define Time Range (UTC Day)
|
|
206
206
|
const startDate = new Date(dateString + 'T00:00:00Z');
|
|
@@ -232,7 +232,7 @@ async function loadDailySocialPostInsights(config, deps, dateString) {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
else if (path.includes(SIGNED_IN_COL_NAME)) {
|
|
235
|
-
// Path format: .../
|
|
235
|
+
// Path format: .../signed_in_users_social/{userId}/posts/{postId}
|
|
236
236
|
const parts = path.split('/');
|
|
237
237
|
const colIndex = parts.indexOf(SIGNED_IN_COL_NAME);
|
|
238
238
|
if (colIndex !== -1 && parts[colIndex + 1]) {
|
|
@@ -70,7 +70,7 @@ exports.runRootDataIndexer = async (config, dependencies) => {
|
|
|
70
70
|
|
|
71
71
|
// Collection Names (Fail-safe defaults)
|
|
72
72
|
const PI_SOCIAL_COLL_NAME = collections.piSocial || 'pi_social_posts';
|
|
73
|
-
const SIGNED_IN_SOCIAL_COLL_NAME = collections.signedInUserSocialCollection || '
|
|
73
|
+
const SIGNED_IN_SOCIAL_COLL_NAME = collections.signedInUserSocialCollection || 'signed_in_users_social';
|
|
74
74
|
|
|
75
75
|
const scanMode = targetDate ? 'SINGLE_DATE' : 'FULL_SCAN';
|
|
76
76
|
logger.log('INFO', `[RootDataIndexer] Starting Root Data Availability Scan... Mode: ${scanMode}`, { targetDate });
|
|
@@ -252,8 +252,14 @@ exports.runRootDataIndexer = async (config, dependencies) => {
|
|
|
252
252
|
if (!universalSocialSnap.empty) {
|
|
253
253
|
universalSocialSnap.docs.forEach(doc => {
|
|
254
254
|
const path = doc.ref.path;
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
// Use includes() to match collection name anywhere in path (more robust)
|
|
256
|
+
// Path format: {collectionName}/{userId}/posts/{postId}
|
|
257
|
+
if (path.includes(`/${PI_SOCIAL_COLL_NAME}/`) || path.startsWith(`${PI_SOCIAL_COLL_NAME}/`)) {
|
|
258
|
+
foundPISocial = true;
|
|
259
|
+
}
|
|
260
|
+
if (path.includes(`/${SIGNED_IN_SOCIAL_COLL_NAME}/`) || path.startsWith(`${SIGNED_IN_SOCIAL_COLL_NAME}/`)) {
|
|
261
|
+
foundSignedInSocial = true;
|
|
262
|
+
}
|
|
257
263
|
});
|
|
258
264
|
}
|
|
259
265
|
|