From 78eef25f1ac5d991343cf16fb3200f4f1c84683b Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 12 Feb 2020 17:39:57 -0500 Subject: [PATCH 1/2] add reposted_claim_hash index fixes https://github.com/lbryio/lbry-sdk/issues/2782 --- lbry/wallet/server/db/writer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lbry/wallet/server/db/writer.py b/lbry/wallet/server/db/writer.py index 2377d46c8..94339fbb6 100644 --- a/lbry/wallet/server/db/writer.py +++ b/lbry/wallet/server/db/writer.py @@ -94,6 +94,7 @@ class SQLDB: create index if not exists claim_txo_hash_idx on claim (txo_hash); create index if not exists claim_activation_height_idx on claim (activation_height, claim_hash); create index if not exists claim_expiration_height_idx on claim (expiration_height); + create index if not exists claim_reposted_claim_hash_idx on claim (reposted_claim_hash); """ CREATE_SUPPORT_TABLE = """ From 205b0c42631af47100af818c2462e6cc74a37c2b Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 13 Feb 2020 10:04:50 -0500 Subject: [PATCH 2/2] call get_platform only once --- lbry/extras/daemon/daemon.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 9ce55b321..fb111b4e5 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -297,6 +297,7 @@ class Daemon(metaclass=JSONRPCServerType): def __init__(self, conf: Config, component_manager: typing.Optional[ComponentManager] = None): self.conf = conf + self.platform_info = system_info.get_platform() self._video_file_analyzer = VideoFileAnalyzer(conf) self._node_id = None self._installation_id = None @@ -307,7 +308,7 @@ class Daemon(metaclass=JSONRPCServerType): skip_components=conf.components_to_skip or [] ) self.component_startup_task = None - self._connection_status: typing.Tuple[float, bool] = [self.component_manager.loop.time(), False] + self._connection_status: typing.Tuple[float, bool] = (self.component_manager.loop.time(), False) logging.getLogger('aiohttp.access').setLevel(logging.WARN) rpc_app = web.Application() @@ -449,7 +450,7 @@ class Daemon(metaclass=JSONRPCServerType): async def start(self): log.info("Starting LBRYNet Daemon") log.debug("Settings: %s", json.dumps(self.conf.settings_dict, indent=2)) - log.info("Platform: %s", json.dumps(system_info.get_platform(), indent=2)) + log.info("Platform: %s", json.dumps(self.platform_info, indent=2)) await self.analytics_manager.send_server_startup() await self.rpc_runner.setup() await self.streaming_runner.setup() @@ -894,9 +895,7 @@ class Daemon(metaclass=JSONRPCServerType): 'build': (str) "dev" | "qa" | "rc" | "release", } """ - platform_info = system_info.get_platform() - log.info("Get version info: %s", json.dumps(platform_info)) - return platform_info + return self.platform_info @requires(WALLET_COMPONENT) async def jsonrpc_resolve(self, urls: typing.Union[str, list], wallet_id=None):