gitlab-org--gitlab-foss/app/models/hooks
Yorick Peterse f30089075f
Fixed pagination of web hook logs
For reasons unknown, the logs of a web hook were paginated in memory.
This would result in the "Edit" page of a web hook timing out once it
has more than a few thousand log entries.

This commit makes the following changes:

1. We use LIMIT/OFFSET to paginate the data, instead of doing this in
   memory.

2. We limit the logs to the last two days, just like the documentation
   says (instead of retrieving everything).

3. We change the indexes on "web_hook_logs" so the query to get the data
   can perform a backwards index scan, without the need for a Filter.

These changes combined ensure that Projects::HooksController#edit no
longer times out.
2018-07-03 14:24:17 +02:00
..
project_hook.rb Merge branch 'jej/mattermost-notification-confidentiality-10-6' into 'security-10-6' 2018-04-05 08:41:56 +02:00
service_hook.rb Wrong data type when testing webhooks 2017-07-20 15:12:06 +00:00
system_hook.rb Add validation to webhook and service URLs to ensure they are not blocked because of SSRF 2018-06-01 11:43:53 +00:00
web_hook.rb Add validation to webhook and service URLs to ensure they are not blocked because of SSRF 2018-06-01 11:43:53 +00:00
web_hook_log.rb Fixed pagination of web hook logs 2018-07-03 14:24:17 +02:00