##// END OF EJS Templates
core: removed last activity as it was creating lots of DB locks.
marcink -
r2929:c363a5c7 default
parent child Browse files
Show More
@@ -32,6 +32,7 b' from rhodecode.lib.vcs import nodes'
32 32 from rhodecode.lib.vcs.conf import settings
33 33 from rhodecode.tests import assert_session_flash
34 34 from rhodecode.tests.fixture import Fixture
35 from rhodecode.model.db import Session
35 36
36 37 fixture = Fixture()
37 38
@@ -166,8 +167,8 b' class TestFilesViews(object):'
166 167 {'message': 'b', 'branch': new_branch}
167 168 ]
168 169 backend.create_repo(commits)
169
170 170 backend.repo.landing_rev = "branch:%s" % new_branch
171 Session().commit()
171 172
172 173 # get response based on tip and not new commit
173 174 response = self.app.get(
@@ -992,10 +992,6 b' class AuthUser(object):'
992 992 def get_instance(self):
993 993 return User.get(self.user_id)
994 994
995 def update_lastactivity(self):
996 if self.user_id:
997 User.get(self.user_id).update_lastactivity()
998
999 995 def propagate_data(self):
1000 996 """
1001 997 Fills in user data and propagates values to this instance. Maps fetched
@@ -1500,9 +1496,6 b' class LoginRequired(object):'
1500 1496 'user %s authenticating with:%s IS authenticated on func %s'
1501 1497 % (user, reason, loc))
1502 1498
1503 # update user data to check last activity
1504 user.update_lastactivity()
1505 Session().commit()
1506 1499 return func(*fargs, **fkwargs)
1507 1500 else:
1508 1501 log.warning(
@@ -514,7 +514,6 b' class SimpleVCS(object):'
514 514 return auth_result.wsgi_application(
515 515 environ, start_response)
516 516
517
518 517 # ==============================================================
519 518 # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
520 519 # ==============================================================
@@ -522,8 +521,6 b' class SimpleVCS(object):'
522 521 if not self.valid_and_active_user(user):
523 522 return HTTPForbidden()(environ, start_response)
524 523 username = user.username
525 user.update_lastactivity()
526 meta.Session().commit()
527 524
528 525 # check user attributes for password change flag
529 526 user_obj = user
General Comments 0
You need to be logged in to leave comments. Login now