Update categories: Add Culture, health => Covid, rearrange
This commit is contained in:
parent
72b21925e5
commit
695f243a93
|
@ -1,21 +1,17 @@
|
||||||
export const CATEGORIES = {
|
export const CATEGORIES = {
|
||||||
politics: 'Politics',
|
politics: 'Politics',
|
||||||
technology: 'Technology',
|
technology: 'Technology',
|
||||||
sports: 'Sports',
|
|
||||||
gaming: 'Gaming',
|
|
||||||
manifold: 'Manifold',
|
|
||||||
science: 'Science',
|
science: 'Science',
|
||||||
world: 'World',
|
world: 'World',
|
||||||
fun: 'Fun',
|
sports: 'Sports',
|
||||||
personal: 'Personal',
|
|
||||||
economics: 'Economics',
|
economics: 'Economics',
|
||||||
|
personal: 'Personal',
|
||||||
|
culture: 'Culture',
|
||||||
|
manifold: 'Manifold',
|
||||||
|
covid: 'Covid',
|
||||||
crypto: 'Crypto',
|
crypto: 'Crypto',
|
||||||
health: 'Health',
|
gaming: 'Gaming',
|
||||||
// entertainment: 'Entertainment',
|
fun: 'Fun',
|
||||||
// society: 'Society',
|
|
||||||
// friends: 'Friends / Community',
|
|
||||||
// business: 'Business',
|
|
||||||
// charity: 'Charities / Non-profits',
|
|
||||||
} as { [category: string]: string }
|
} as { [category: string]: string }
|
||||||
|
|
||||||
export const TO_CATEGORY = Object.fromEntries(
|
export const TO_CATEGORY = Object.fromEntries(
|
||||||
|
|
|
@ -35,11 +35,10 @@ const getUserBatches = async () => {
|
||||||
for (let i = 0; i < users.length; i += BATCH_SIZE) {
|
for (let i = 0; i < users.length; i += BATCH_SIZE) {
|
||||||
userBatches.push(users.slice(i, 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
|
export const updateFeed = functions.pubsub
|
||||||
|
|
Loading…
Reference in New Issue
Block a user