Small changes and fixes for hub refactor

This commit is contained in:
Jeffrey Picard 2022-01-21 20:55:07 +00:00 committed by Jack Robison
parent 95ec1f3af4
commit 31312af517
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
4 changed files with 15 additions and 15 deletions

View file

@ -15,18 +15,8 @@ RUN apt-get update && \
tar unzip \
build-essential \
automake libtool \
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/*
pkg-config
RUN pip install lbry-rocksdb
RUN pip install uvloop
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
RUN mkdir -p $db_dir

View file

@ -20,6 +20,14 @@ if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/lbry-leveldb ]]; then
rm "$filename"
fi
/home/lbry/.local/bin/lbry-hub-elastic-sync
echo 'starting server'
/home/lbry/.local/bin/lbry-hub "$@"
if [ -z "$HUB_COMMAND" ]; then
echo "HUB_COMMAND env variable must be writer, reader, or es_sync"
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

View file

@ -1634,6 +1634,8 @@ class BlockProcessor:
could be lost.
"""
await self.open()
self._caught_up_event = caught_up_event
try:
await asyncio.wait([

View file

@ -32,7 +32,7 @@ setup(
'lbrynet=lbry.extras.cli:main',
'lbry-hub-writer=lbry.wallet.server.cli:run_writer_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'
],
},