Skip to content

Commit

Permalink
KPMP-5523: Fix dlu-watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rlreamy committed Oct 17, 2024
1 parent 0d9ed4d commit 78d6df1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
9 changes: 6 additions & 3 deletions data_management/DluWatcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM python:3.10-slim
FROM python:3.10-slim-bullseye

COPY requirements.txt ./

RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --progress-bar off --no-cache-dir -r requirements.txt
RUN pip3 install -U flask-cors
RUN pip3 install multiprocessing

COPY ./lib/ ./lib
COPY ./services/dlu_filesystem.py ./services/dlu_filesystem.py
COPY ./services/dlu_package_inventory.py ./services/dlu_package_inventory.py
Expand All @@ -12,4 +15,4 @@ COPY ./services/dlu_mongo.py ./services/dlu_mongo.py
COPY ./model ./model
COPY ./watch_files.py ./

ENTRYPOINT ["python3", "watch_files.py"]
ENTRYPOINT ["python3", "watch_files.py"]
3 changes: 2 additions & 1 deletion data_management/lib/mongo_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ def get_mongo_connection(self):
)
database = mongo_client[self.database]
return database
except:
except Exception:
logger.error(
f"Can't connect to Mongo\nMake sure you have filled out the correct environment variables in the .env file"
)
logger.error(traceback.format_exc())
logger.error(self.host)
os.sys.exit()

Expand Down
2 changes: 1 addition & 1 deletion data_management/rebuild.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python3 setup.py install --user
docker build -t kingstonduo/data-management:1.7 .
docker build -t kingstonduo/data-management:1.8 .
2 changes: 1 addition & 1 deletion data_management/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ python_dotenv
python-dateutil
zarr-checksum
pyyaml
gunicorn
gunicorn

0 comments on commit 78d6df1

Please sign in to comment.