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

Merge branch 'deploy-reindex' into 'rails'

reindexar los sitios al terminar de compilarlos

Closes #7530, #7529, #7528, #7527, #7512, #7511, #7510, #7509, #7494, #7493, #7492, #7491, #7408, #7407, #7406, #7405, #7397, #7396, #7395, #7394, #7383, #7382, #7381, #7380, #7170, #7169, #7168, #7167, #7154, #7153, #7152, and #7151

See merge request sutty/sutty!104
This commit is contained in:
fauno 2023-03-23 22:06:10 +00:00
commit 2c5a93f11b
4 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,38 @@
# frozen_string_literal: true
# Reindexa los artículos al terminar la compilación
class DeployReindex < Deploy
def deploy
time_start
site.reset
Site.transaction do
site.indexed_posts.destroy_all
site.index_posts!
end
time_stop
build_stats.create action: 'reindex',
log: 'Reindex',
seconds: time_spent_in_seconds,
bytes: size,
status: true
site.touch
end
def size
0
end
def limit
1
end
def hostname; end
def url; end
def destination; end
end

View file

@ -0,0 +1 @@
-# NADA

View file

@ -111,6 +111,10 @@ en:
title: Alternative domain name
success: Success!
error: Error
deploy_reindex:
title: Reindex
success: Success!
error: Error
deploy_localized_domain:
title: Domain name by language
success: Success!

View file

@ -111,6 +111,10 @@ es:
title: Dominio alternativo
success: ¡Éxito!
error: Hubo un error
deploy_reindex:
title: Reindexación
success: ¡Éxito!
error: Hubo un error
deploy_localized_domain:
title: Dominio según idioma
success: ¡Éxito!