all repos — searchix @ 40d106a50be7fa87739e82c87c161db8e6a69b12

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: split storage import and indexing

Alan Pearce
commit

40d106a50be7fa87739e82c87c161db8e6a69b12

parent

517f219f3b249a26890f881569f9eac34ba7363d

1 file changed, 9 insertions(+), 8 deletions(-)

changed files
M internal/index/index_meta.gointernal/index/index_meta.go
@@ -5,19 +5,20 @@ "encoding/json"
"time" "alin.ovh/searchix/internal/file" - "alin.ovh/x/log" + "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" ) -const CurrentSchemaVersion = 7 +const CurrentSchemaVersion = 8 type SourceMeta struct { - ImportedAt time.Time - UpdatedAt time.Time - Path string - Rev string + IndexedAt time.Time + StoredAt time.Time + UpdatedAt time.Time + Path string + Rev string } type data struct {
@@ -114,8 +115,8 @@
func (i *Meta) LastImported() time.Time { var last time.Time for _, sourceMeta := range i.Sources { - if sourceMeta.ImportedAt.After(last) { - last = sourceMeta.ImportedAt + if sourceMeta.StoredAt.After(last) { + last = sourceMeta.StoredAt } }