Skip to content

Wait for pending update method #9

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

Merged
merged 4 commits into from
Apr 20, 2020
Merged

Wait for pending update method #9

merged 4 commits into from
Apr 20, 2020

Conversation

curquiza
Copy link
Member

@curquiza curquiza commented Apr 18, 2020

Related to this issue.

  • Rename waitForUpdateStatus into waitForPendingUpdate
  • Add tests for this method

Bonus:

  • Prepare for the v0.10
  • Remove define('__ROOT__', dirname(dirname(__FILE__))); line in tests file to avoid this warning when running tests:
Notice: Constant __ROOT__ already defined in /Users/curquiza/Documents/meilisearch-php/tests/Settings/DisplayedAttributesTest.php on line 6
PHP Notice:  Constant __ROOT__ already defined in /Users/curquiza/Documents/meilisearch-php/tests/Settings/RankingRulesTest.php on line 6

@curquiza curquiza requested a review from eskombro April 18, 2020 23:00
@curquiza curquiza force-pushed the wait-for-pending-update branch from b508fe3 to e90de71 Compare April 18, 2020 23:38
eskombro
eskombro previously approved these changes Apr 20, 2020
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

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

Everything seems perfect! The only thing I'm not 100% sure about is the default values for timeout and interval. For instance, I think that maybe 10ms is too short for an interval, and it's going to make way too many unnecesary requests, but I think 50 ms is more than enough. Also, a default timeout, I would set it on 5 seconds. But this seems very arbitrary too. Of course it is not that important as user can customize, but it would be interesting to define something reasonable for most use cases a. Should we define default values for this method in this and other SDKs?

@eskombro
Copy link
Member

Also, I have no writing or admin rights to this repo ;)

@curquiza
Copy link
Member Author

Indeed, I prefer your values than the ones I set, I'm going to change that.
And I'm going to write it down on our discussion about that: meilisearch/integration-guides#1
So that we will know if someone disagrees with this statement.

PS: I gave you the admin access! 👍

@curquiza curquiza merged commit 95b30aa into master Apr 20, 2020
@curquiza curquiza deleted the wait-for-pending-update branch April 20, 2020 09:26
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