Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cachewd **/*.go !**/*_test.go !state/**/* debounce=2s ready=http:8080/_readiness=200: CACHEW_URL=http://localhost:8080 CACHEW_LOG_LEVEL=debug cachewd
cachewd cachew.hcl **/*.go !**/*_test.go !state/**/* debounce=2s ready=http:8080/_readiness=200: CACHEW_URL=http://localhost:8080 CACHEW_LOG_LEVEL=debug cachewd
7 changes: 6 additions & 1 deletion cachew.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ git-clone {}

metrics {}


git {
#bundle-interval = "24h"
snapshot-interval = "1h"
repack-interval = "1h"
}

host "https://ghcr.io" {
headers = {
"Authorization": "Bearer QQ=="
}
}

host "https://w3.org" {}

github-releases {
Expand Down
6 changes: 3 additions & 3 deletions internal/strategy/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"crypto/sha256"
"encoding/hex"
"io"
"maps"
"net/http"
"net/http/httputil"
"os"
Expand Down Expand Up @@ -128,8 +129,6 @@ func New(
if err != nil {
logger.WarnContext(ctx, "Failed to get pre-fetch refs for existing repo", "upstream", repo.UpstreamURL(),
"error", err)
} else {
logger.InfoContext(ctx, "Pre-fetch refs for existing repo", "upstream", repo.UpstreamURL(), "refs", preRefs)
}

start := time.Now()
Expand All @@ -146,7 +145,8 @@ func New(
logger.WarnContext(ctx, "Failed to get post-fetch refs for existing repo", "upstream", repo.UpstreamURL(),
"error", err)
} else {
logger.InfoContext(ctx, "Post-fetch refs for existing repo", "upstream", repo.UpstreamURL(), "refs", postRefs)
maps.DeleteFunc(postRefs, func(k, v string) bool { return preRefs[k] == v })
logger.InfoContext(ctx, "Post-fetch changed refs for existing repo", "upstream", repo.UpstreamURL(), "refs", postRefs)
}

if s.config.SnapshotInterval > 0 {
Expand Down