5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 23:36:21 +00:00

fix: obtener los sitios ordenados para ir actualizándolos en orden

This commit is contained in:
f 2023-03-29 15:06:46 -03:00
parent ee46154330
commit 7f263c1557

View file

@ -23,7 +23,7 @@ class CleanupService
#
# @return [nil]
def cleanup_older_sites!
Site.where('updated_at < ?', before).find_each do |site|
Site.where('updated_at < ?', before).order(updated_at: :desc).find_each do |site|
next unless File.directory? site.path
Rails.logger.info "Limpiando dependencias, archivos temporales y repositorio git de #{site.name}"
@ -39,7 +39,7 @@ class CleanupService
#
# @return [nil]
def cleanup_newer_sites!
Site.where('updated_at >= ?', before).find_each do |site|
Site.where('updated_at >= ?', before).order(updated_at: :desc).find_each do |site|
next unless File.directory? site.path
Rails.logger.info "Limpiando repositorio git de #{site.name}"