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
3 changes: 0 additions & 3 deletions internal/strategy/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func (s *Strategy) warmExistingRepos(ctx context.Context) error {

if s.config.SnapshotInterval > 0 {
s.scheduleSnapshotJobs(repo)
s.scheduleLFSSnapshotJobs(repo)
}
if s.config.RepackInterval > 0 {
s.scheduleRepackJobs(repo)
Expand Down Expand Up @@ -545,7 +544,6 @@ func (s *Strategy) startClone(ctx context.Context, repo *gitclone.Repository) er

if s.config.SnapshotInterval > 0 {
s.scheduleSnapshotJobs(repo)
s.scheduleLFSSnapshotJobs(repo)
}
if s.config.RepackInterval > 0 {
s.scheduleRepackJobs(repo)
Expand Down Expand Up @@ -576,7 +574,6 @@ func (s *Strategy) startClone(ctx context.Context, repo *gitclone.Repository) er

if s.config.SnapshotInterval > 0 {
s.scheduleSnapshotJobs(repo)
s.scheduleLFSSnapshotJobs(repo)
}
if s.config.RepackInterval > 0 {
s.scheduleRepackJobs(repo)
Expand Down
9 changes: 3 additions & 6 deletions internal/strategy/git/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ func (s *Strategy) scheduleSnapshotJobs(repo *gitclone.Repository) {
s.scheduler.SubmitPeriodicJob(repo.UpstreamURL(), "snapshot-periodic", s.config.SnapshotInterval, func(ctx context.Context) error {
return s.generateAndUploadSnapshot(ctx, repo)
})
s.scheduler.SubmitPeriodicJob(repo.UpstreamURL(), "lfs-snapshot-periodic", s.config.SnapshotInterval, func(ctx context.Context) error {
return s.generateAndUploadLFSSnapshot(ctx, repo)
})
mirrorInterval := s.config.MirrorSnapshotInterval
if mirrorInterval == 0 {
mirrorInterval = s.config.SnapshotInterval
Expand Down Expand Up @@ -764,12 +767,6 @@ func (s *Strategy) generateAndUploadLFSSnapshot(ctx context.Context, repo *gitcl
return nil
}

func (s *Strategy) scheduleLFSSnapshotJobs(repo *gitclone.Repository) {
s.scheduler.SubmitPeriodicJob(repo.UpstreamURL(), "lfs-snapshot-periodic", s.config.SnapshotInterval, func(ctx context.Context) error {
return s.generateAndUploadLFSSnapshot(ctx, repo)
})
}

func (s *Strategy) handleLFSSnapshotRequest(w http.ResponseWriter, r *http.Request, host, pathValue string) {
ctx := r.Context()
logger := logging.FromContext(ctx)
Expand Down