Commit graph

3 commits

Author SHA1 Message Date
Olaf Tomalka
4b98e812b2 Optimized event pruning query to avoid two queries. 2016-09-07 12:55:25 -07:00
Olaf Tomalka
c0a92cb801 Limited amount of pruned Event rows per run
Old deployments of Gitlab might have a big number of old events to be
deleted. Such numbers cause the worker to timeout.
I've limited the amount of rows that should be destroyed at once to
10000, and increased how often pruning shall take place to 4 times a
day.
2016-09-07 19:41:25 +02:00
Olaf Tomalka
e25b48ffcf Added cron to prune events older than 12 months.
Since contribution calendar shows only 12 months of activity,
events older than that time are not visible anywhere and can be
safely pruned saving big amount of database storage.

Fixes #21164
2016-09-07 19:41:25 +02:00