mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 05:31:42 +00:00
fix: obtener los sitios ordenados para ir actualizándolos en orden
This commit is contained in:
parent
d99f02bd0c
commit
2fac95d2e8
1 changed files with 2 additions and 2 deletions
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue