Update categories: Add Culture, health => Covid, rearrange

This commit is contained in:
James Grugett 2022-05-15 23:44:47 -04:00
parent 72b21925e5
commit 695f243a93
2 changed files with 9 additions and 14 deletions

View File

@ -1,21 +1,17 @@
export const CATEGORIES = {
politics: 'Politics',
technology: 'Technology',
sports: 'Sports',
gaming: 'Gaming',
manifold: 'Manifold',
science: 'Science',
world: 'World',
fun: 'Fun',
personal: 'Personal',
sports: 'Sports',
economics: 'Economics',
personal: 'Personal',
culture: 'Culture',
manifold: 'Manifold',
covid: 'Covid',
crypto: 'Crypto',
health: 'Health',
// entertainment: 'Entertainment',
// society: 'Society',
// friends: 'Friends / Community',
// business: 'Business',
// charity: 'Charities / Non-profits',
gaming: 'Gaming',
fun: 'Fun',
} as { [category: string]: string }
export const TO_CATEGORY = Object.fromEntries(

View File

@ -35,11 +35,10 @@ const getUserBatches = async () => {
for (let i = 0; i < users.length; i += BATCH_SIZE) {
userBatches.push(users.slice(i, i + BATCH_SIZE))
}
userBatches = userBatches.slice(0, MAX_BATCHES)
console.log('updating feed batches', userBatches.length, 'of', MAX_BATCHES)
console.log('updating feed batches', MAX_BATCHES, 'of', userBatches.length)
return userBatches
return userBatches.slice(0, MAX_BATCHES)
}
export const updateFeed = functions.pubsub