Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Aug 4, 2023

Related to #106

This PR makes the following two changes to the wait method:

  • Removes the max_attempts option. To stop polling for a prediction to complete, you can either return false in a callback passed to the stop parameter of the wait method, or call predictions.cancel. Or if polling via the run method, you can pass an AbortSignal to the signal property.
  • Updates the polling interval for a prediction from 250ms to 500ms. This is a more reasonable default for most use cases, and it brings this project in line with the Python client's behavior.

@mattt mattt marked this pull request as draft August 4, 2023 11:28
@mattt mattt marked this pull request as ready for review August 4, 2023 12:58
@mattt mattt merged commit edeed24 into main Aug 4, 2023
@mattt mattt deleted the mattt/wait-options branch August 4, 2023 12:58
@mattt mattt mentioned this pull request Aug 4, 2023
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