Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kpmp 5523 fixes to dlu watcher #98

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Brief summary of what's in this release:
- Added logic to change ownership of moved files off of root user
- Removed logic that required connection to spectrack for dlu-watcher
- updated logic for handling nested folders
- updated base image of DluWatcher container
- set install of requirements as 'progress-banner off' to address issue with installing Flask and using all threads in DluWatcher container

### Breaking changes

Expand Down
8 changes: 5 additions & 3 deletions data_management/DluWatcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
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

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 +14,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