Revert "sessions: Stop using the cached_db sessions engine."

This reverts commit 2fa77d9d54.

Further investigation has determined that this did not fix the
password-reset problem described in the previous commit message;
meanwhile, it causes other problems.  We still need to track down the
root cause of the original password-reset bug.
This commit is contained in:
Tim Abbott 2018-11-30 15:54:13 -08:00
parent 34bf5412b1
commit 18e2118fc8
2 changed files with 2 additions and 4 deletions

View File

@ -49,7 +49,7 @@ def delete_all_deactivated_user_sessions() -> None:
for session in Session.objects.all():
user_profile_id = get_session_user(session)
if user_profile_id is None:
continue # nocoverage # to debug
continue
user_profile = get_user_profile_by_id(user_profile_id)
if not user_profile.is_active or user_profile.realm.deactivated:
logging.info("Deactivating session for deactivated user %s" % (user_profile.email,))

View File

@ -650,9 +650,7 @@ RABBITMQ_PASSWORD = get_secret("rabbitmq_password")
# CACHING CONFIGURATION
########################################################################
# TODO: Restore this to django.contrib.sessions.backends.cached_db
# after debugging; see https://github.com/zulip/zulip/issues/10856 for details.
SESSION_ENGINE = "django.contrib.sessions.backends.db"
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
# Compress large values being stored in memcached; this is important
# for at least the realm_users cache.