5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-06 17:47:05 +00:00

fix: movido metodo lfs_cleanup en cleanup_service.rb a site::repository

This commit is contained in:
jazzari 2024-03-01 12:19:51 -03:00
parent 969d641a91
commit 6c3b2ab022
2 changed files with 7 additions and 8 deletions

View file

@ -235,5 +235,10 @@ class Site
r&.success?
end
def lfs_cleanup
site.repository.git_sh("git", "lfs", "prune")
site.repository.git_sh("git", "lfs", "dedup")
end
end
end

View file

@ -31,7 +31,7 @@ class CleanupService
site.deploys.find_each(&:cleanup!)
site.repository.gc
lfs_cleanup
site.repository.lfs_cleanup
site.touch
end
end
@ -46,14 +46,8 @@ class CleanupService
Rails.logger.info "Limpiando repositorio git de #{site.name}"
site.repository.gc
lfs_cleanup
site.repository.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