curiouslearning / followthelearners

MIT License
2 stars 1 forks source link

pre-aggregate users before ingestion #543

Closed eric-gt closed 3 years ago

eric-gt commented 3 years ago

compile aggregate counts of new learners as they are prepped for ingestion to ensure that firestore internal aggregations remain accurate over time. Added a buffer to prevent against counting the same batch of users multiple times: if an aggregate document has been edited in the last 12 hours, do not update it again. The exception is for documents created within the last hour (to allow for users who are the first in their country to be ingested to be counted)