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

add locking retries (WP-667) #342

Merged
merged 1 commit into from
Nov 23, 2021
Merged

Conversation

vsolovei-smartling
Copy link
Contributor

No description provided.

@@ -209,6 +231,27 @@ private function getActiveProfile(): ConfigurationProfileEntity
return $profile;
}

private function lockWithRetry(callable $command, $ignoreLockNotAcquired = false): void
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks ok, we can release. But I expected something more sophisticated since we use symfony DI and can transparently do some magic around api object. I thought that we can create a "proxy" class (implements ApiWrapperInterface) but it intercepts all method calls by using PHP magic methods __invoke.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://bt.smartling.net/browse/WP-669, I'm strongly against using magic methods for this, needs discussion

@vsolovei-smartling vsolovei-smartling merged commit bd89393 into master Nov 23, 2021
@vsolovei-smartling vsolovei-smartling deleted the WP-667-lock-retries branch November 23, 2021 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants