Skip to content
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

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Conversation

JNdhlovu
Copy link
Contributor

@JNdhlovu JNdhlovu commented Aug 6, 2024

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

@JNdhlovu JNdhlovu requested a review from a team as a code owner August 6, 2024 07:59
request: request,
interval: 1,
numAttempts: 30
)
var response : JobStatusResponse<JobResult>? = nil
Copy link

@github-actions github-actions bot Aug 6, 2024

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)

Copy link

github-actions bot commented Aug 6, 2024

Warnings
⚠️ The source files were changed, but the tests remain unmodified. Consider updating or adding to the tests to match the source changes.

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,
Copy link
Contributor

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))
Copy link
Contributor

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.

Copy link
Contributor

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.

@JNdhlovu JNdhlovu merged commit 4a7148c into main Aug 6, 2024
3 checks passed
@JNdhlovu JNdhlovu deleted the feature/pollingtimeoutfix branch August 6, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants