5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 06:24:17 +00:00

feat: guardar el último commit indexado

This commit is contained in:
f 2023-09-27 15:40:14 -03:00
parent 8376e663ce
commit f18d0213df
No known key found for this signature in database

View file

@ -1,9 +1,9 @@
# frozen_string_literal: true
# Indexa todos los artículos de un sitio
#
# TODO: Hacer opcional
class Site
# Indexa todos los artículos de un sitio
#
# TODO: Hacer opcional
module Index
extend ActiveSupport::Concern
@ -15,6 +15,8 @@ class Site
def index_posts!
Site.transaction do
docs.each(&:index!)
update(last_indexed_commit: repository.head_commit.oid)
end
end
end