forked from LBRYCommunity/lbry-sdk
--exit-on-disconnect flag to start lbrynet
This commit is contained in:
parent
a334a93757
commit
b56dbd19f9
2 changed files with 6 additions and 1 deletions
|
@ -574,6 +574,9 @@ class TranscodeConfig(BaseConfig):
|
||||||
class CLIConfig(TranscodeConfig):
|
class CLIConfig(TranscodeConfig):
|
||||||
|
|
||||||
api = String('Host name and port for lbrynet daemon API.', 'localhost:5279', metavar='HOST:PORT')
|
api = String('Host name and port for lbrynet daemon API.', 'localhost:5279', metavar='HOST:PORT')
|
||||||
|
exit_on_disconnect = Toggle(
|
||||||
|
'Shutdown daemon when connection to wallet server closes.', False
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def api_connection_url(self) -> str:
|
def api_connection_url(self) -> str:
|
||||||
|
|
|
@ -190,7 +190,8 @@ class WalletManager:
|
||||||
'jurisdiction': config.jurisdiction,
|
'jurisdiction': config.jurisdiction,
|
||||||
'concurrent_hub_requests': config.concurrent_hub_requests,
|
'concurrent_hub_requests': config.concurrent_hub_requests,
|
||||||
'data_path': config.wallet_dir,
|
'data_path': config.wallet_dir,
|
||||||
'tx_cache_size': config.transaction_cache_size
|
'tx_cache_size': config.transaction_cache_size,
|
||||||
|
'exit_on_disconnect': config.exit_on_disconnect,
|
||||||
}
|
}
|
||||||
if 'LBRY_FEE_PER_NAME_CHAR' in os.environ:
|
if 'LBRY_FEE_PER_NAME_CHAR' in os.environ:
|
||||||
ledger_config['fee_per_name_char'] = int(os.environ.get('LBRY_FEE_PER_NAME_CHAR'))
|
ledger_config['fee_per_name_char'] = int(os.environ.get('LBRY_FEE_PER_NAME_CHAR'))
|
||||||
|
@ -244,6 +245,7 @@ class WalletManager:
|
||||||
'hub_timeout': self.config.hub_timeout,
|
'hub_timeout': self.config.hub_timeout,
|
||||||
'concurrent_hub_requests': self.config.concurrent_hub_requests,
|
'concurrent_hub_requests': self.config.concurrent_hub_requests,
|
||||||
'data_path': self.config.wallet_dir,
|
'data_path': self.config.wallet_dir,
|
||||||
|
'exit_on_disconnect': self.config.exit_on_disconnect,
|
||||||
}
|
}
|
||||||
if Config.lbryum_servers.is_set(self.config):
|
if Config.lbryum_servers.is_set(self.config):
|
||||||
self.ledger.config['explicit_servers'] = self.config.lbryum_servers
|
self.ledger.config['explicit_servers'] = self.config.lbryum_servers
|
||||||
|
|
Loading…
Add table
Reference in a new issue