ashb commented on a change in pull request #12332:
URL: https://github.com/apache/airflow/pull/12332#discussion_r524088119
##########
File path: airflow/settings.py
##########
@@ -337,6 +337,33 @@ def prepare_syspath():
sys.path.append(PLUGINS_FOLDER)
+def get_session_lifetime_config():
+ """Gets session timeout configs and handles outdated configs gracefully."""
+ session_lifetime_minutes = conf.get('webserver',
'session_lifetime_minutes', fallback=None)
+ session_lifetime_days = conf.get('webserver', 'session_lifetime_days',
fallback=None)
+ uses_deprecated_lifetime_configs = session_lifetime_days or conf.get(
+ 'webserver', 'force_logout_after', fallback=None
+ )
+
+ if uses_deprecated_lifetime_configs and not session_lifetime_minutes:
Review comment:
We could do `session_lifetime_minutes ==
conf.airflow_defaults.get('webserver', 'session_lifetime_minutes')`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]