lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 482 forks source link

usage payment service more resilient, will continue running until funds available to pay usage fee #3668

Closed moodyjon closed 2 years ago

moodyjon commented 2 years ago

Fixes #3663

The WalletServerPayer was receiving asyncio.CancelledError from retriable_call() because jsonrpc_wallet_reconnect() creates a situation where the connection is totally gone.

I reworked how it handles exceptions so it tolerates ConnectionError, InsufficientFundsError without exiting prematurely.

Plan to revert https://github.com/lbryio/lbry-sdk/pull/3668/commits/44228961e688c2513a2ac9d2ba127c9009b54577 which is for push button testing.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.09%) to 57.728% when pulling 055d5aa9ea4690c8a201e47f5a4a0f305075aab4 on moodyjon:test_single_server_payment into e10f57d1ed03dc34f9f2fe72fe9d282817b80be5 on lbryio:master.

eukreign commented 2 years ago

i approved this but you have to remove the workflow_dispatch

moodyjon commented 2 years ago

workflow_dispatch removed and exception logging tweaked: https://github.com/lbryio/lbry-sdk/pull/3668/commits/13d05d37811d7bffee424f076e31e5da19285401