summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorAndrew <write@imaginarycode.com>2017-02-10 23:00:46 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-11 12:00:46 +0800
commit42835c7f82ac379d5d583fa8406cff529b9d0e9e (patch)
tree87dc278aa0261a93b65bd06a39db7688f030a288 /modules/setting
parentcf0f451c37496c84795e98191a20350e0f5be35c (diff)
downloadgitea-42835c7f82ac379d5d583fa8406cff529b9d0e9e.tar.gz
gitea-42835c7f82ac379d5d583fa8406cff529b9d0e9e.zip
Implement archive cleanup (#885)
* Implement archive cleanup Fixes #769 Signed-off-by: Andrew <write@imaginarycode.com> * Make sure to close the directory file * Resolve issues noted by @strk * edit cheatsheet app.ini [ci skip] * oops [ci skip]
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 1cbb3eac0a..747ddbf708 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -307,6 +307,12 @@ var (
RunAtStart bool
Schedule string
} `ini:"cron.check_repo_stats"`
+ ArchiveCleanup struct {
+ Enabled bool
+ RunAtStart bool
+ Schedule string
+ OlderThan time.Duration
+ } `ini:"cron.archive_cleanup"`
}{
UpdateMirror: struct {
Enabled bool
@@ -334,6 +340,16 @@ var (
RunAtStart: true,
Schedule: "@every 24h",
},
+ ArchiveCleanup: struct {
+ Enabled bool
+ RunAtStart bool
+ Schedule string
+ OlderThan time.Duration
+ }{
+ RunAtStart: true,
+ Schedule: "@every 24h",
+ OlderThan: 24 * time.Hour,
+ },
}
// Git settings