Merge pull request #4491 from minrk/424-activity

avoid counting failed requests to not-running servers as 'activity'
This commit is contained in:
Erik Sundell
2023-06-26 19:24:33 +02:00
committed by GitHub

View File

@@ -1433,6 +1433,12 @@ class UserUrlHandler(BaseHandler):
# accept token auth for API requests that are probably to non-running servers # accept token auth for API requests that are probably to non-running servers
_accept_token_auth = True _accept_token_auth = True
# don't consider these redirects 'activity'
# if the redirect is followed and the subsequent action taken,
# _that_ is activity
def _record_activity(self, obj, timestamp=None):
return False
def _fail_api_request(self, user_name='', server_name=''): def _fail_api_request(self, user_name='', server_name=''):
"""Fail an API request to a not-running server""" """Fail an API request to a not-running server"""
self.log.warning( self.log.warning(