From d99f02bd0cd08558621ceaeed7e3b48b565d719b Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 15:06:26 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20informar=20qu=C3=A9=20se=20est=C3=A1=20?= =?UTF-8?q?haciendo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/cleanup_service.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/cleanup_service.rb b/app/services/cleanup_service.rb index ad87cf9a..01b42d9e 100644 --- a/app/services/cleanup_service.rb +++ b/app/services/cleanup_service.rb @@ -26,6 +26,8 @@ class CleanupService Site.where('updated_at < ?', before).find_each do |site| 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.repository.gc @@ -40,6 +42,8 @@ class CleanupService Site.where('updated_at >= ?', before).find_each do |site| next unless File.directory? site.path + Rails.logger.info "Limpiando repositorio git de #{site.name}" + site.repository.gc site.touch end