Skip to content

Conversation

@thatkookooguy
Copy link

This PR enhances the existing getAllUserData function by adding:

  • Retrieval of each user’s posts and messages
  • Calculation of total activity per user (posts + messages)
  • Generation of metadata for each user (post/message visibility breakdown)
  • A delay between each user’s data load to prevent rate-limiting

All existing functionality remains intact.

Change summary

  • Added db.getPostsByUserId() and db.getMessagesByUserId() calls
  • Added calculateMetaInfo() to compute basic visibility breakdown
  • Used sum() utility to compute total activity per user
  • Introduced delay() between iterations to avoid possible throttling
  • Enhanced getUserById() query to include department info

Tested locally with ~100 users, and the performance seemed acceptable for now.
Please review and let me know if anything should be improved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants