JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
Review Request #8874 — Created April 5, 2017 and submitted
When populating the avatars registry, the list of enabled backends and the default backend are saved into the siteconfig, which then results in the siteconfig being dirty. This can cause the siteconfig cache to be emptied too often, as it's being cleared on all threads every time a new thread spins up, along with a couple times during initial setup of the avatar support. Now the settings are conditionally written to the siteconfig only if they've changed, ensuring we don't save unless we have something useful to save
Unit tests pass.
No longer saw my debug info showing the siteconfig cache was being
cleared, or the extra siteconfig database queries.
Description | From | Last Updated |
---|---|---|
We chould compare self._enabled_services (as a set) to set(siteconfig.get(self.ENABLED_SERVICES_KEY) to ensure they are not differing only by order. |
brennie |
Switched to comparing sets for enabled services.
Revision 2 (+18 -3)