diff --git a/app/services/cleanup_service.rb b/app/services/cleanup_service.rb index ad87cf9a..c03858bd 100644 --- a/app/services/cleanup_service.rb +++ b/app/services/cleanup_service.rb @@ -29,6 +29,7 @@ class CleanupService site.deploys.find_each(&:cleanup!) site.repository.gc + lfs_cleanup site.touch end end @@ -41,7 +42,14 @@ class CleanupService next unless File.directory? site.path site.repository.gc + lfs_cleanup site.touch end end + + private + def lfs_cleanup + site.repository.git_sh("git", "lfs", "prune") + site.repository.git_sh("git", "lfs", "dedup") + end end