Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously we set all users in_guild to False, and relied on users being set back to in_guild when iterating through guild.members However, this caused two problems 1. For a short window a users in_guild status was incorrect 2. It required an update for all users in_guild to be sent to postgres to update in_guild back to True. This diff changes that, so instead only users who are not found in the guild have in_guild set to False. The bottleneck for this query is the number of users that are currently in_guild=False. Testing locally, with 360k users off guild, this took 7.4s to query out, and 0.1s to process & commit
- Loading branch information