diff --git a/app/services/cleanup_service.rb b/app/services/cleanup_service.rb index b0792159..28f6f860 100644 --- a/app/services/cleanup_service.rb +++ b/app/services/cleanup_service.rb @@ -31,6 +31,7 @@ class CleanupService site.deploys.find_each(&:cleanup!) site.repository.gc + lfs_cleanup site.touch end end @@ -45,7 +46,14 @@ class CleanupService Rails.logger.info "Limpiando repositorio git de #{site.name}" 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