Skip to content

Commit

Permalink
Making retry method with retries private
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaal111 committed Jan 21, 2024
1 parent 523156c commit 352cdd6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Sources/KamaalUtils/Retrier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ import KamaalExtensions
public enum Retrier {
public static func retryUntilSuccess<T>(
intervalTimeInSeconds: TimeInterval,
retries: Int = 0,
completion: () async throws -> T
) async throws -> T {
try await self.retryUntilSuccess(
intervalTimeInSeconds: intervalTimeInSeconds,
retries: 0,
completion: completion
)
}

private static func retryUntilSuccess<T>(
intervalTimeInSeconds: TimeInterval,
retries: Int,
completion: () async throws -> T
) async throws -> T {
do {
Expand Down

0 comments on commit 352cdd6

Please sign in to comment.