admin: store client in ops error to track excessive user details triggering this error.

- additionally add some sort of rate limitter to prevent flooding this view
This commit is contained in:
Marcin Kuzminski 2018-12-21 07:21:07 +01:00
parent 9407cbb12d
commit 20614be05f

View file

@ -65,11 +65,13 @@ class OpsView(BaseAppView):
"""
Test exception handling and emails on errors
"""
class TestException(Exception):
pass
# add timeout so we add some sort of rate limiter
time.sleep(2)
msg = ('RhodeCode Enterprise test exception. '
'Generation time: {}'.format(time.time()))
'Client:{}. Generation time: {}.'.format(self.request.user, time.time()))
raise TestException(msg)
@view_config(