Skip to content

Commit

Permalink
feat: Bypass caching on start
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Dec 30, 2023
1 parent f4187a9 commit e428804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/metadata/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

absto "github.com/ViBiOh/absto/pkg/model"
"github.com/ViBiOh/fibr/pkg/provider"
"github.com/ViBiOh/httputils/v4/pkg/cache"
)

func (s Service) EventConsumer(ctx context.Context, e provider.Event) {
Expand Down Expand Up @@ -79,7 +80,7 @@ func (s Service) handleStartEvent(ctx context.Context, event provider.Event) err
}

item := event.Item
if !forced && s.hasMetadata(ctx, item) {
if !forced && s.hasMetadata(cache.Bypass(ctx), item) {
slog.DebugContext(ctx, "has metadata", "item", item.Pathname)
return nil
}
Expand Down

0 comments on commit e428804

Please sign in to comment.