Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
Merge PR #788: Stay logged in to our instances [MNG-1938]
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed May 7, 2021
2 parents 9541f0e + 335e9b8 commit 686eb62
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions instance/models/mixins/openedx_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ def _get_configuration_variables(self):
"""
Creates and returns a dictionary of ansible configuration variables for the instance
"""
# Vars that need to be set in both EDXAPP_LMS_ENV_EXTRA and EDXAPP_CMS_ENV_EXTRA:
extra_config = {
"BROKER_HEARTBEAT": 0,
"ADDL_INSTALLED_APPS": [],
# Stay logged in for one year, not two weeks
"SESSION_COOKIE_AGE": 31536000,
# Use database-backed sessions to stay logged in across appserver deploys.
# (We have EDXAPP_CLEARSESSIONS_CRON_ENABLED to clean up old data.)
"SESSION_ENGINE": "django.contrib.sessions.backends.cached_db",
}

template = {
# System
"COMMON_HOSTNAME": self.server_hostname,
Expand Down Expand Up @@ -63,14 +74,10 @@ def _get_configuration_variables(self):
# Note: use EDXAPP_CMS_ENV_EXTRA and/or EDXAPP_LMS_ENV_EXTRA; don't use
# EDXAPP_ENV_EXTRA as the other two overwrite this.
"EDXAPP_CMS_ENV_EXTRA": {
"BROKER_HEARTBEAT": 0,
"ADDL_INSTALLED_APPS": [
],
**extra_config,
},
"EDXAPP_LMS_ENV_EXTRA": {
"BROKER_HEARTBEAT": 0,
"ADDL_INSTALLED_APPS": [
],
**extra_config,
"HEARTBEAT_EXTENDED_CHECKS": [
# celery check is default, but we need to include it here
# because we also add other extended checks
Expand Down

0 comments on commit 686eb62

Please sign in to comment.