SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 29dcedb2bc77b11b47b15fdf6146e0f3c006e2b6
parent 02ac078858ffbd7fb095b100ba9528b3b18037bd
Author: nickfarrow <nick@nickfarrow.com>
Date:   Thu, 24 Mar 2022 02:00:59 +1100

stay alive

Diffstat:
Mconfig.toml | 5+++--
Mnode/bitcoind.py | 9++++++++-
Mnode/clightning.py | 5++++-
Mnode/lnd.py | 5++++-
4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/config.toml b/config.toml @@ -63,8 +63,9 @@ payment_timeout = 3600 # Required confirmations for a payment required_confirmations = 2 -# Global connection attempts -connection_attempts = 3 +# Global connection attempts (Note: SatSale has 60s breaks after the 5th attempt) +# If you're getting worker timeouts, try launch with a long `--timeout`. +connection_attempts = 15 # Console log level (DEBUG, INFO, WARNING, ERROR) loglevel = "DEBUG" diff --git a/node/bitcoind.py b/node/bitcoind.py @@ -69,7 +69,10 @@ class btcd: except Exception as e: logging.error(e) - time.sleep(2) + if i < 5: + time.sleep(2) + else: + time.sleep(60) logging.info( "Attempting again... {}/{}...".format( i + 1, config.connection_attempts @@ -131,6 +134,10 @@ class btcd: except Exception as e: logging.error(e) + if i < 5: + time.sleep(2) + else: + time.sleep(60) logging.info( "Attempting again... {}/{}...".format( i + 1, config.connection_attempts diff --git a/node/clightning.py b/node/clightning.py @@ -49,7 +49,10 @@ class clightning: except Exception as e: logging.error(e) - time.sleep(2) + if i < 5: + time.sleep(2) + else: + time.sleep(60) logging.info( "Attempting again... {}/{}...".format( i + 1, config.connection_attempts diff --git a/node/lnd.py b/node/lnd.py @@ -56,7 +56,10 @@ class lnd: except Exception as e: logging.error(e) - time.sleep(2) + if i < 5: + time.sleep(2) + else: + time.sleep(60) logging.info( "Attempting again... {}/{}...".format( i + 1, config.connection_attempts