mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 03:29:43 +02:00
Allow package cleanup from admin page (#25307)
Until now expired package data gets deleted daily by a cronjob. The admin page shows the size of all packages and the size of unreferenced data. The users (#25035, #20631) expect the deletion of this data if they run the cronjob from the admin page but the job only deletes data older than 24h. This PR adds a new button which deletes all expired data.  --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
1 parent
c2b6897e35
commit
0c6ae61229
7 files changed
+45
-7
No files matched your search
@@ -152,7 +152,7 @@ func registerCleanupPackages() {
|
||||
OlderThan: 24 * time.Hour,
|
||||
}, func(ctx context.Context, _ *user_model.User, config Config) error {
|
||||
realConfig := config.(*OlderThanConfig)
|
||||
return packages_cleanup_service.Cleanup(ctx, realConfig.OlderThan)
|
||||
return packages_cleanup_service.CleanupTask(ctx, realConfig.OlderThan)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user