diff options
author | Keuin <[email protected]> | 2023-07-07 00:34:25 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-07 00:34:25 +0800 |
commit | 6eb5a7af48d04adc5625cbc8355e2556db4b992f (patch) | |
tree | ba9327214773497590e7c24995c4221b1c8a8b5a | |
parent | c133daaba30d6c75eda2136a3c11682710f4562a (diff) |
Refactor: move retry into single package.
-rw-r--r-- | common/retry/retry.go (renamed from common/retry.go) | 2 | ||||
-rw-r--r-- | recording/task.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/common/retry.go b/common/retry/retry.go index ff7b869..43e7d69 100644 --- a/common/retry.go +++ b/common/retry/retry.go @@ -1,4 +1,4 @@ -package common +package retry import ( "context" diff --git a/recording/task.go b/recording/task.go index 78be348..5c1f5ee 100644 --- a/recording/task.go +++ b/recording/task.go @@ -8,7 +8,7 @@ Concrete task works are done in the `runner.go` file. import ( "context" "fmt" - "github.com/keuin/slbr/common" + "github.com/keuin/slbr/common/retry" "github.com/keuin/slbr/logging" "time" ) @@ -90,7 +90,7 @@ func AutoRetryWithTask[T any]( t *RunningTask, supplier func() (T, error), ) (T, error) { - return common.AutoRetry[T]( + return retry.AutoRetry[T]( t.ctx, supplier, t.Transport.MaxRetryTimes, @@ -105,7 +105,7 @@ func AutoRetryWithConfig[T any]( t *TaskConfig, supplier func() (T, error), ) (T, error) { - return common.AutoRetry[T]( + return retry.AutoRetry[T]( ctx, supplier, t.Transport.MaxRetryTimes, |