ashb commented on a change in pull request #12332:
URL: https://github.com/apache/airflow/pull/12332#discussion_r523051483
##########
File path: airflow/www/app.py
##########
@@ -71,23 +69,7 @@ def create_app(config=None, testing=False,
app_name="Airflow"):
flask_app = Flask(__name__)
flask_app.secret_key = conf.get('webserver', 'SECRET_KEY')
- if conf.has_option('webserver', 'SESSION_LIFETIME_DAYS') or
conf.has_option(
- 'webserver', 'FORCE_LOG_OUT_AFTER'
- ):
- logging.error(
- '`SESSION_LIFETIME_DAYS` option from `webserver` section has been '
- 'renamed to `SESSION_LIFETIME_MINUTES`. New option allows to
configure '
- 'session lifetime in minutes. FORCE_LOG_OUT_AFTER option has been
removed '
- 'from `webserver` section. Please update your configuration.'
- )
- # Stop gunicorn server
https://github.com/benoitc/gunicorn/blob/20.0.4/gunicorn/arbiter.py#L526
- sys.exit(4)
- else:
- session_lifetime_minutes = conf.getint('webserver',
'SESSION_LIFETIME_MINUTES', fallback=43200)
- logging.info('User session lifetime is set to %s minutes.',
session_lifetime_minutes)
-
- flask_app.config['PERMANENT_SESSION_LIFETIME'] =
timedelta(minutes=session_lifetime_minutes)
-
+ flask_app.config['PERMANENT_SESSION_LIFETIME'] =
timedelta(minutes=conf.get_session_lifetime_config())
Review comment:
I wonder if we should make this a function in airflow.settings, rather
than a method on config -- so far methods on config are (I think) all just
generalized.
----------------------------------------------------------------
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]