diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-10-14 13:06:18 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-10-14 13:06:18 +0000 |
commit | 05ce93f191039df06a812a085476ba60af5a2cb6 (patch) | |
tree | bbe7cde7fc50fccacb02f5becf80c70166cb7de1 | |
parent | 2b5010cac8e6000d7a85287abfc2f5ce39a9db77 (diff) | |
download | lorry-controller-05ce93f191039df06a812a085476ba60af5a2cb6.tar.gz |
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
-rwxr-xr-x | lorry-controller-remove-old-jobs | 3 |
1 files changed, 1 insertions, 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'], |