From 3cffaa43f735919557b70630f020f7b302b03450 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 14 Dec 2019 18:42:14 -0500 Subject: [PATCH] remove invalid claim_id from default channel filter list --- lbry/lbry/wallet/server/db/reader.py | 2 +- lbry/lbry/wallet/server/session.py | 2 +- lbry/scripts/sqlite_perf_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lbry/lbry/wallet/server/db/reader.py b/lbry/lbry/wallet/server/db/reader.py index 2f3d71421..6d0f0e3c9 100644 --- a/lbry/lbry/wallet/server/db/reader.py +++ b/lbry/lbry/wallet/server/db/reader.py @@ -168,7 +168,7 @@ def execute_query(sql, values) -> List: plain_sql = interpolate(sql, values) if context.is_tracking_metrics: context.metrics['execute_query'][-1]['sql'] = plain_sql - if str(err) == "interrupted": + if isinstance(err, apsw.InterruptError): context.log.warning("interrupted slow sqlite query:\n%s", plain_sql) raise SQLiteInterruptedError(context.metrics) context.log.exception('failed running query', exc_info=err) diff --git a/lbry/lbry/wallet/server/session.py b/lbry/lbry/wallet/server/session.py index 82ac1574c..d36fcc64e 100644 --- a/lbry/lbry/wallet/server/session.py +++ b/lbry/lbry/wallet/server/session.py @@ -108,7 +108,7 @@ class LBRYElectrumX(ElectrumX): self.bp: LBRYBlockProcessor = self.session_mgr.bp self.db: LBRYDB = self.bp.db # space separated list of channel URIs used for filtering bad content - filtering_channels = self.env.default('FILTERING_CHANNELS_IDS', '1111') + filtering_channels = self.env.default('FILTERING_CHANNELS_IDS', '') self.filtering_channels_ids = list(filter(None, filtering_channels.split(' '))) def set_request_handlers(self, ptuple): diff --git a/lbry/scripts/sqlite_perf_test.py b/lbry/scripts/sqlite_perf_test.py index 8b8994e32..9da638ff4 100644 --- a/lbry/scripts/sqlite_perf_test.py +++ b/lbry/scripts/sqlite_perf_test.py @@ -5,7 +5,7 @@ from lbry.wallet.server.metrics import calculate_avg_percentiles db_path = '../../../lbryconf/wallet-server/claims.db' -default_query_timout = 0.25 +default_query_timout = 0.25 log = logging.getLogger(__name__) log.addHandler(logging.StreamHandler())