ashb commented on a change in pull request #12332:
URL: https://github.com/apache/airflow/pull/12332#discussion_r523050013



##########
File path: airflow/configuration.py
##########
@@ -705,6 +705,28 @@ def _warn_deprecate(section, key, deprecated_section, 
deprecated_name):
                 stacklevel=3,
             )
 
+    def get_session_lifetime_config(self):
+        session_lifetime_days = self.getint('webserver', 
'SESSION_LIFETIME_DAYS')
+        if session_lifetime_days or self.getint('webserver', 
'FORCE_LOG_OUT_AFTER'):

Review comment:
       ```suggestion
           session_lifetime_days = self.getint('webserver', 
'session_lifetime_days', fallback=None)
           if session_lifetime_days or self.getint('webserver', 
'force_logout_after', fallback=None):
   ```

##########
File path: airflow/configuration.py
##########
@@ -705,6 +705,28 @@ def _warn_deprecate(section, key, deprecated_section, 
deprecated_name):
                 stacklevel=3,
             )
 
+    def get_session_lifetime_config(self):
+        session_lifetime_days = self.getint('webserver', 
'SESSION_LIFETIME_DAYS')
+        if session_lifetime_days or self.getint('webserver', 
'FORCE_LOG_OUT_AFTER'):
+            logging.warning(
+                '`SESSION_LIFETIME_DAYS` option from `webserver` section has 
been '
+                'renamed to `SESSION_LIFETIME_MINUTES`. The new option allows 
to configure '
+                'session lifetime in minutes. FORCE_LOG_OUT_AFTER option has 
been removed '
+                'from `webserver` section. Please update your configuration.'

Review comment:
       ```suggestion
                   'from `webserver` section. Please update your 
configuration.',
                   DeprecationWarning,
   ```




----------------------------------------------------------------
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]


Reply via email to