-
Notifications
You must be signed in to change notification settings - Fork 221
Feat/ppcp ideal polling #2849
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
base: master
Are you sure you want to change the base?
Feat/ppcp ideal polling #2849
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ code/snyk check is complete. No issues have been found. (View Details) |
e60d793
to
d21cd19
Compare
d21cd19
to
5ab4a87
Compare
gatewayId?: string, | ||
): Promise<void> { | ||
await new Promise<void>((resolve, reject) => { | ||
const timeout = setTimeout(resolve, this.pollingInterval); |
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.
Can you explain why you are using setTimeout
here pls. From my vision it is redundant, but maybe I do not see the real reason
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.
This timeout needed to tick polling mechanism every n seconds
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.
It is still not clear for me. Looks like this timeout is working for nothing. You call resolve
when time runs out for what?
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.
Discussed in private chat
What?
Added PPCP APM Ideal polling mechanism
Why?
To properly handle order status
Testing / Proof
Screen.Recording.2025-06-11.at.10.45.33.mov
@bigcommerce/team-checkout @bigcommerce/team-payments