Skip to content

Commit

Permalink
Merge branch 'main' into feat/prom-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
y-eight committed Dec 15, 2023
2 parents f96e9b3 + 904bded commit 96304b8
Show file tree
Hide file tree
Showing 8 changed files with 548 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ jobs:
- name: Test
run: |
go mod download
go install github.com/matryer/moq@v0.3.3
go generate ./...
go test --race --coverprofile cover.out -v ./...
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
go.work
gen

# generated interface mock files
*_moq.go

# test configs for debug launch configuration
.vscode/config

Expand Down
5 changes: 1 addition & 4 deletions internal/helper/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ func Retry(effector Effector, rc RetryConfig) func(ctx context.Context) error {
delay := getExpBackoff(rc.Delay, r)
log.WarnContext(ctx, fmt.Sprintf("Effector call failed, retrying in %v", delay))

timer := time.NewTimer(delay)
defer timer.Stop() //nolint:gocritic //TODO: check if this is correct

select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
case <-time.After(delay):
}
}
}
Expand Down
Loading

0 comments on commit 96304b8

Please sign in to comment.