-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make polling to par with android #211
Conversation
request: request, | ||
interval: 1, | ||
numAttempts: 30 | ||
) | ||
var response : JobStatusResponse<JobResult>? = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Initializing an optional variable with nil is redundant. (redundant_optional_initialization
)
Generated by 🚫 Danger Swift against dc98712 |
@@ -13,11 +14,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | |||
didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? | |||
) -> Bool { | |||
UINavigationBar.appearance().titleTextAttributes = [ | |||
NSAttributedString.Key.foregroundColor: UIColor.black | |||
NSAttributedString.Key.foregroundColor: UIColor.black, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve trailing_comma
warning.
} catch { | ||
latestError = error | ||
} | ||
try await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain why you're introducing this delay? I think this can slow down the code execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already discussed this during our sync.
Story: TIMEOUT FIXES FOR IOS
Summary
For polling iOS would run and when the maximum attempts has been reached it'd throw a timeout exception. Android on the other hand returns the last response when the maximum attempt is reached and it's a flow. This PR attempts to copy functionality on android to iOS so that they work the same way
Known Issues
N/A
Test Instructions
Run any product polling to confirm