xrpl-py icon indicating copy to clipboard operation
xrpl-py copied to clipboard

add timeout to faucet

Open dangell7 opened this issue 2 years ago • 4 comments

High Level Overview of Change

My faucet is slow and this PR adds a timeout to the faucet post request.

Context of Change

I used a default timeout of 5 however there are some sub-settings we could add if we wanted to get more fine grained with the timeout.

connect: float | UnsetType | None = UNSET, read: float | UnsetType | None = UNSET, write: float | UnsetType | None = UNSET,

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Refactor (non-breaking change that only restructures code)
  • [ ] Tests (You added tests for code that already exists, or your new feature included in this PR)
  • [ ] Documentation Updates
  • [ ] Release

Test Plan

dangell7 avatar Feb 15 '23 21:02 dangell7

I am actually working on adding a memos params (with default values) to all faucet transactions in client libraries, this PR is highly related, would you mind if I base my PR on yours? thanks

jonathanlei avatar Feb 15 '23 21:02 jonathanlei

I am actually working on adding a memos params (with default values) to all faucet transactions in client libraries, this PR is highly related, would you mind if I base my PR on yours? thanks

Not at all :)

dangell7 avatar Feb 15 '23 22:02 dangell7

This didn't end up being added as part of the memos change - @dangell7 I think this would make sense as an optional parameter, but not as a default timeout value (because I'm not sure other users want a timeout, and picking a number that works for everyone with sidechain setups seems hard to do).

If you don't want to add that, we can close this potentially.

JST5000 avatar May 24 '23 17:05 JST5000

@dangell7 FYI the Ripple faucet repo is public if you'd rather use that (it might be faster) https://github.com/xpring-eng/testnet-faucet

mvadari avatar Jun 08 '23 23:06 mvadari