forked from LBRYCommunity/lbry-sdk
Merge pull request #3547 from lbryio/rocksdb-hub-lbcd-jeff-fixes
Small changes and fixes for hub refactor
This commit is contained in:
commit
5a4e8210f5
5 changed files with 21 additions and 17 deletions
|
@ -15,18 +15,8 @@ RUN apt-get update && \
|
||||||
tar unzip \
|
tar unzip \
|
||||||
build-essential \
|
build-essential \
|
||||||
automake libtool \
|
automake libtool \
|
||||||
pkg-config \
|
pkg-config
|
||||||
librocksdb-dev
|
|
||||||
# python3.7 \
|
|
||||||
# python3-dev \
|
|
||||||
# python3-pip \
|
|
||||||
# python3-wheel \
|
|
||||||
# python3-cffi \
|
|
||||||
# python3-setuptools && \
|
|
||||||
# update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
|
||||||
# rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN pip install lbry-rocksdb
|
|
||||||
RUN pip install uvloop
|
RUN pip install uvloop
|
||||||
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
||||||
RUN mkdir -p $db_dir
|
RUN mkdir -p $db_dir
|
||||||
|
|
|
@ -20,6 +20,14 @@ if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/lbry-leveldb ]]; then
|
||||||
rm "$filename"
|
rm "$filename"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/home/lbry/.local/bin/lbry-hub-elastic-sync
|
if [ -z "$HUB_COMMAND" ]; then
|
||||||
echo 'starting server'
|
echo "HUB_COMMAND env variable must be writer, reader, or es_sync"
|
||||||
/home/lbry/.local/bin/lbry-hub "$@"
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$HUB_COMMAND" in
|
||||||
|
writer ) /home/lbry/.local/bin/lbry-hub-writer "$@" ;;
|
||||||
|
reader ) /home/lbry/.local/bin/lbry-hub-server "$@" ;;
|
||||||
|
es_sync ) /home/lbry/.local/bin/lbry-hub-elastic-sync ;;
|
||||||
|
* ) "HUB_COMMAND env variable must be writer, reader, or es_sync" && exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
|
@ -1634,6 +1634,8 @@ class BlockProcessor:
|
||||||
could be lost.
|
could be lost.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
await self.open()
|
||||||
|
|
||||||
self._caught_up_event = caught_up_event
|
self._caught_up_event = caught_up_event
|
||||||
try:
|
try:
|
||||||
await asyncio.wait([
|
await asyncio.wait([
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ setup(
|
||||||
'lbrynet=lbry.extras.cli:main',
|
'lbrynet=lbry.extras.cli:main',
|
||||||
'lbry-hub-writer=lbry.wallet.server.cli:run_writer_forever',
|
'lbry-hub-writer=lbry.wallet.server.cli:run_writer_forever',
|
||||||
'lbry-hub-server=lbry.wallet.server.cli:run_server_forever',
|
'lbry-hub-server=lbry.wallet.server.cli:run_server_forever',
|
||||||
'lbry-hub-elastic-sync=lbry.wallet.server.db.elasticsearch.sync:run_elastic_sync',
|
'lbry-hub-elastic-sync=lbry.wallet.server.cli:run_es_sync_forever',
|
||||||
'orchstr8=lbry.wallet.orchstr8.cli:main'
|
'orchstr8=lbry.wallet.orchstr8.cli:main'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -260,8 +260,12 @@ class BasicTransactionTests(IntegrationTestCase):
|
||||||
async def broadcast(tx):
|
async def broadcast(tx):
|
||||||
try:
|
try:
|
||||||
return await real_broadcast(tx)
|
return await real_broadcast(tx)
|
||||||
# except lbry.wallet.rpc.jsonrpc.RPCError:
|
except lbry.wallet.rpc.jsonrpc.RPCError as err:
|
||||||
# pass
|
# this is expected in tests where we try to double spend.
|
||||||
|
if 'the transaction was rejected by network rules.' in str(err):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise err
|
||||||
finally:
|
finally:
|
||||||
e.set()
|
e.set()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue