From 05ce93f191039df06a812a085476ba60af5a2cb6 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 14 Oct 2015 13:06:18 +0000 Subject: Change the default job result expiry to 3 days From a disk space point of view, 1 year's worth of logs, while potentially excessive, isn't too much of an ask, since disk space is cheap enough. However our queries on the database run slower when it is large, so we need a shorter log retention policy, and it's best when the defaults do the right thing. 1 day's worth of logs was found to be 87MB, which means 3 days is roughly 250MB, which is acceptable. Change-Id: If3dd58fa01f785bc7d7029a45b6a0fc35c2c2b1d --- lorry-controller-remove-old-jobs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lorry-controller-remove-old-jobs b/lorry-controller-remove-old-jobs index 1448649..8cdf601 100755 --- a/lorry-controller-remove-old-jobs +++ b/lorry-controller-remove-old-jobs @@ -54,13 +54,12 @@ class OldJobRemover(cliapp.Application): ONE_MINUTE = 60 ONE_HOUR = 60 * ONE_MINUTE ONE_DAY = 24 * ONE_HOUR - ONE_YEAR = 365 * ONE_DAY self.settings.integer( ['max-age-in-seconds', 'max-age'], 'maximum age of a finished job in seconds', metavar='SECONDS', - default=ONE_YEAR) + default=3 * ONE_DAY) self.settings.integer( ['debug-now'], -- cgit v1.2.1