Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andriiVitvitskyi1990
Copy link
Contributor

@andriiVitvitskyi1990 andriiVitvitskyi1990 commented Apr 29, 2025

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

@bcsnyk
Copy link
Contributor

bcsnyk commented Jun 7, 2025

🎉 Snyk checks have passed. No issues have been found so far.

code/snyk check is complete. No issues have been found. (View Details)

@andriiVitvitskyi1990 andriiVitvitskyi1990 force-pushed the feat/ppcp_ideal_polling branch 2 times, most recently from e60d793 to d21cd19 Compare June 7, 2025 12:45
@andriiVitvitskyi1990 andriiVitvitskyi1990 marked this pull request as ready for review June 12, 2025 08:17
@andriiVitvitskyi1990 andriiVitvitskyi1990 requested a review from a team as a code owner June 12, 2025 08:17
gatewayId?: string,
): Promise<void> {
await new Promise<void>((resolve, reject) => {
const timeout = setTimeout(resolve, this.pollingInterval);
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in private chat

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.

3 participants