Skip to content

Commit

Permalink
chore(updater): change retry.DelayType to exponential (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
shini4i authored Sep 15, 2023
1 parent 8e132d5 commit 479fe48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ kind-upload:
@echo "===> Building [$(CYAN)dev$(RESET)] version of [$(CYAN)argo-watcher$(RESET)] binary"
@CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -ldflags="-s -w -X main.version=dev" -o argo-watcher ./cmd/argo-watcher
@echo "===> Building [$(CYAN)argo-watcher$(RESET)] docker image"
@docker build -t argo-watcher:dev .
@docker build -t ghcr.io/shini4i/argo-watcher:dev .
@echo "===> Loading [$(CYAN)argo-watcher$(RESET)] docker image into [$(CYAN)kind$(RESET)] cluster"
@kind load docker-image argo-watcher:dev -n disposable-cluster
@kind load docker-image ghcr.io/shini4i/argo-watcher:dev -n disposable-cluster
@echo "===> Restarting [$(CYAN)argo-watcher$(RESET)] deployment"
@kubectl rollout restart deploy argo-watcher -n argo-watcher

Expand Down
4 changes: 2 additions & 2 deletions cmd/argo-watcher/argo_status_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ func (updater *ArgoStatusUpdater) waitForApplicationDeployment(task models.Task)
}
return nil
},
retry.DelayType(retry.FixedDelay),
retry.Attempts(3),
retry.DelayType(retry.BackOffDelay),
retry.Attempts(5),
retry.OnRetry(func(n uint, err error) {
log.Warn().Str("id", task.Id).Msgf("Failed to update git repo. Error: %s, retrying...", err.Error())
}),
Expand Down

0 comments on commit 479fe48

Please sign in to comment.