mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 20:56:22 +00:00
ya no es necesario porque estamos reindexando a demanda
(cherry picked from commit a171aa24e3
)
This commit is contained in:
parent
0d781b6a15
commit
fca074bb0e
2 changed files with 10 additions and 38 deletions
|
@ -1,38 +0,0 @@
|
||||||
# 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
|
|
10
db/migrate/20231026211607_deprecate_deploy_reindex.rb
Normal file
10
db/migrate/20231026211607_deprecate_deploy_reindex.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Ya no es necesario reindexar por la fuerza
|
||||||
|
class DeprecateDeployReindex < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
Deploy.where(type: 'DeployReindex').destroy_all
|
||||||
|
end
|
||||||
|
|
||||||
|
def down;end
|
||||||
|
end
|
Loading…
Reference in a new issue