Skip to content

Commit

Permalink
Merge pull request #354 from cisagov/AL-fix-worker
Browse files Browse the repository at this point in the history
Fix P&E and crossfeed workers
  • Loading branch information
schmelz21 authored Jun 20, 2024
2 parents b44f001 + 5a1f3e5 commit 18acba4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions backend/Dockerfile.pe
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ RUN ./aws/install

# Install pe-source module
# Sync the latest from cf-staging branch
RUN git clone -b AL-staging-SQS https://github.com/cisagov/pe-reports.git && \
cd pe-reports && \
git checkout 6405a2041656152b176b5fc9b3becb5dc11a5f3e && \
RUN git clone -b crossfeed-SQS https://github.com/cisagov/ATC-Framework.git && \
cd ATC-Framework && \
git checkout a4036e94ad54876cb592fc966f57e7fd84750e9a && \
pip install .

RUN python -m spacy download en_core_web_lg
Expand Down
3 changes: 0 additions & 3 deletions backend/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ RUN pip3.10 install --upgrade pip

RUN apt remove dav1d && apt autoclean && apt autoremove

# Install pe-source module
# Sync the latest from cf-staging branch
RUN git clone -b cf-source-staging https://github.com/cisagov/pe-reports.git && cd pe-reports && git checkout c9cbbd73b22ef38cabe1da6ba50aeb2dc0be4f99 && sed -i 's/"pandas == 1.1.5"/"pandas == 1.5.1"/g' setup.py && sed -i 's/psycopg2-binary == 2.9.3/psycopg2-binary == 2.9.5/g' setup.py && sed -i 's/psycopg2-binary == 2.9.3/psycopg2-binary == 2.9.5/g' setup_reports.py && pip install .
# Python dependencies

COPY worker/requirements.txt worker/requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions backend/worker/generate_config.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Generate database.ini
cat << EOF > pe-reports/src/pe_reports/data/database.ini
cat << EOF > ATC-Framework/src/pe_reports/data/database.ini
[postgres]
host=${DB_HOST}
database=${PE_DB_NAME}
Expand Down Expand Up @@ -52,6 +52,6 @@ pe_reports_path=$(pip show pe-reports | grep -E '^Location:' | awk '{print $2}')
pe_reports_path="${pe_reports_path%/pe-reports}/pe_reports"

# Copy database.ini to the module's installation directory
cp /app/pe-reports/src/pe_reports/data/database.ini "${pe_reports_path}/data/"
cp /app/ATC-Framework/src/pe_reports/data/database.ini "${pe_reports_path}/data/"

exec "$@"

0 comments on commit 18acba4

Please sign in to comment.