]> source.dussan.org Git - gitea.git/commit
Cron job to cleanup hook_task table (#13080)
authorBrad Albright <32200834+bhalbright@users.noreply.github.com>
Tue, 26 Jan 2021 21:02:42 +0000 (15:02 -0600)
committerGitHub <noreply@github.com>
Tue, 26 Jan 2021 21:02:42 +0000 (22:02 +0100)
commita598877fdf64a37b20eb1bf4372cbe798fc94486
tree14c500acefea3a5684f4e1ecedaec1ff9d9708e5
parent0f726caf97e4b682172f23fb46d3992f60ed6ed2
Cron job to cleanup hook_task table (#13080)

Close **Prune hook_task Table (#10741)**

Added a cron job to delete webhook deliveries in the hook_task table. It can be turned on/off and the schedule controlled globally via app.ini. The data can be deleted by either the age of the delivery which is the default or by deleting the all but the most recent deliveries _per webhook_.

Note: I had previously submitted pr #11416  but I closed it when I realized that I had deleted per repository instead of per webhook. Also, I decided allowing the settings to be overridden via the ui was overkill. Also this version allows the deletion by age which is probably what most people would want.
custom/conf/app.example.ini
docs/content/doc/advanced/config-cheat-sheet.en-us.md
models/webhook.go
models/webhook_test.go
modules/cron/setting.go
modules/cron/tasks_basic.go
options/locale/locale_en-US.ini