core: removed last activity as it was creating lots of DB locks.
This commit is contained in:
parent
9038c818bd
commit
d6757c3989
3 changed files with 2 additions and 11 deletions
|
|
@ -32,6 +32,7 @@ from rhodecode.lib.vcs import nodes
|
|||
from rhodecode.lib.vcs.conf import settings
|
||||
from rhodecode.tests import assert_session_flash
|
||||
from rhodecode.tests.fixture import Fixture
|
||||
from rhodecode.model.db import Session
|
||||
|
||||
fixture = Fixture()
|
||||
|
||||
|
|
@ -166,8 +167,8 @@ class TestFilesViews(object):
|
|||
{'message': 'b', 'branch': new_branch}
|
||||
]
|
||||
backend.create_repo(commits)
|
||||
|
||||
backend.repo.landing_rev = "branch:%s" % new_branch
|
||||
Session().commit()
|
||||
|
||||
# get response based on tip and not new commit
|
||||
response = self.app.get(
|
||||
|
|
|
|||
|
|
@ -992,10 +992,6 @@ class AuthUser(object):
|
|||
def get_instance(self):
|
||||
return User.get(self.user_id)
|
||||
|
||||
def update_lastactivity(self):
|
||||
if self.user_id:
|
||||
User.get(self.user_id).update_lastactivity()
|
||||
|
||||
def propagate_data(self):
|
||||
"""
|
||||
Fills in user data and propagates values to this instance. Maps fetched
|
||||
|
|
@ -1500,9 +1496,6 @@ class LoginRequired(object):
|
|||
'user %s authenticating with:%s IS authenticated on func %s'
|
||||
% (user, reason, loc))
|
||||
|
||||
# update user data to check last activity
|
||||
user.update_lastactivity()
|
||||
Session().commit()
|
||||
return func(*fargs, **fkwargs)
|
||||
else:
|
||||
log.warning(
|
||||
|
|
|
|||
|
|
@ -514,7 +514,6 @@ class SimpleVCS(object):
|
|||
return auth_result.wsgi_application(
|
||||
environ, start_response)
|
||||
|
||||
|
||||
# ==============================================================
|
||||
# CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
|
||||
# ==============================================================
|
||||
|
|
@ -522,8 +521,6 @@ class SimpleVCS(object):
|
|||
if not self.valid_and_active_user(user):
|
||||
return HTTPForbidden()(environ, start_response)
|
||||
username = user.username
|
||||
user.update_lastactivity()
|
||||
meta.Session().commit()
|
||||
|
||||
# check user attributes for password change flag
|
||||
user_obj = user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue