mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 19:21:45 +00:00
Merge branch 'issue-15200' into 'rails'
Movido metodo lfs_cleanup en cleanup_service.rb a site::repository See merge request sutty/sutty!246
This commit is contained in:
commit
f705111584
2 changed files with 7 additions and 8 deletions
|
@ -235,5 +235,10 @@ class Site
|
||||||
|
|
||||||
r&.success?
|
r&.success?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lfs_cleanup
|
||||||
|
git_sh("git", "lfs", "prune")
|
||||||
|
git_sh("git", "lfs", "dedup")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CleanupService
|
||||||
site.deploys.find_each(&:cleanup!)
|
site.deploys.find_each(&:cleanup!)
|
||||||
|
|
||||||
site.repository.gc
|
site.repository.gc
|
||||||
lfs_cleanup
|
site.repository.lfs_cleanup
|
||||||
site.touch
|
site.touch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,14 +46,8 @@ class CleanupService
|
||||||
Rails.logger.info "Limpiando repositorio git de #{site.name}"
|
Rails.logger.info "Limpiando repositorio git de #{site.name}"
|
||||||
|
|
||||||
site.repository.gc
|
site.repository.gc
|
||||||
lfs_cleanup
|
site.repository.lfs_cleanup
|
||||||
site.touch
|
site.touch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
def lfs_cleanup
|
|
||||||
site.repository.git_sh("git", "lfs", "prune")
|
|
||||||
site.repository.git_sh("git", "lfs", "dedup")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue