5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 09:51:42 +00:00

feat: informar qué se está haciendo

This commit is contained in:
f 2023-03-29 15:06:26 -03:00
parent 4442338a68
commit d99f02bd0c

View file

@ -26,6 +26,8 @@ class CleanupService
Site.where('updated_at < ?', before).find_each do |site| Site.where('updated_at < ?', before).find_each do |site|
next unless File.directory? site.path next unless File.directory? site.path
Rails.logger.info "Limpiando dependencias, archivos temporales y repositorio git de #{site.name}"
site.deploys.find_each(&:cleanup!) site.deploys.find_each(&:cleanup!)
site.repository.gc site.repository.gc
@ -40,6 +42,8 @@ class CleanupService
Site.where('updated_at >= ?', before).find_each do |site| Site.where('updated_at >= ?', before).find_each do |site|
next unless File.directory? site.path next unless File.directory? site.path
Rails.logger.info "Limpiando repositorio git de #{site.name}"
site.repository.gc site.repository.gc
site.touch site.touch
end end