python-discord / metricity

Advanced metric collection for the Python Discord server
MIT License
42 stars 17 forks source link

Improve user in-guild sync process #159

Closed ChrisLovering closed 2 weeks ago

ChrisLovering commented 2 weeks ago

Closes #157

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