Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Minehut/archie
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.4
Choose a base ref
...
head repository: Minehut/archie
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 13, 2024

  1. Copy the full SHA
    c8d4a6b View commit details
  2. Merge pull request #6 from Minehut/multiple-lifecycle-expirations

    Updating lifecycle expired value
    rayjanoka authored Sep 13, 2024
    Copy the full SHA
    e75e104 View commit details
Showing with 4 additions and 1 deletion.
  1. +4 −1 archie/removeObject.go
5 changes: 4 additions & 1 deletion archie/removeObject.go
Original file line number Diff line number Diff line change
@@ -5,13 +5,16 @@ import (
"context"
"github.com/nats-io/nats.go"
"github.com/rs/zerolog"
"golang.org/x/exp/slices"
"time"
)

func (a *Archiver) removeObject(ctx context.Context, mLog zerolog.Logger, eventObjKey string, msg *nats.Msg, record event.Record) (error, string, AckType) {
metadata, _ := msg.Metadata()

if a.SkipLifecycleExpired && (record.Source.Host == "Internal: [ILM-EXPIRY]" || record.Source.UserAgent == "Internal: [ILM-EXPIRY]") {
lifecycleExpirations := []string{"Internal: [ILM-EXPIRY]", "Internal: [ILM-Expiry]"}

if a.SkipLifecycleExpired && (slices.Contains(lifecycleExpirations, record.Source.Host) || slices.Contains(lifecycleExpirations, record.Source.UserAgent)) {
mLog.Info().
Uint64("numDelivered", metadata.NumDelivered).
Str("queueDuration", time.Now().Sub(metadata.Timestamp).String()).