Skip to content

Commit

Permalink
Merge pull request #46 from Unholster/finishing-touches
Browse files Browse the repository at this point in the history
Finishing touches
  • Loading branch information
ijmarshall authored Jun 24, 2022
2 parents f5f513c + 8d715d0 commit 9a27819
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN mkdir -p /var/lib/deploy/robotreviewer/data
ADD server.py /var/lib/deploy/
ADD server_api.py /var/lib/deploy/
ADD entrypoint.sh /var/lib/deploy/
ADD clean_uploaded_pdfs.py /var/lib/deploy/
ADD crontab /etc/cron.d/crontab
ADD robotreviewer /var/lib/deploy/robotreviewer
RUN chown -R deploy.deploy /var/lib/deploy/robotreviewer
Expand Down
4 changes: 2 additions & 2 deletions clean_uploaded_pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def cleanup_database(days=1):
c = conn.cursor()
c.execute("DELETE FROM article WHERE timestamp < datetime(?) AND dont_delete=0", [d])
conn.commit()
conn.execute("VACUUM") # make the database smaller again
conn.commit()
# conn.execute("VACUUM") # make the database smaller again
# conn.commit()
conn.close()


Expand Down
2 changes: 1 addition & 1 deletion crontab
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 */12 * * * . /var/lib/deploy/cron.env && /var/lib/deploy/miniconda3/envs/robotreviewer/bin/python /var/lib/deploy/clean_uploaded_pdfs.py > /proc/1/fd/1 2>/proc/1/fd/2
0 3 * * * . /var/lib/deploy/cron.env && /var/lib/deploy/miniconda3/envs/robotreviewer/bin/python /var/lib/deploy/clean_uploaded_pdfs.py > /proc/1/fd/1 2>/proc/1/fd/2
6 changes: 2 additions & 4 deletions docker-compose.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ services:
target: /var/lib/deploy/config.json
restart: unless-stopped
command: web
ports:
- 5050:5000

depends_on:
- celery

Expand All @@ -35,8 +34,7 @@ services:
target: /var/lib/deploy/config.json
restart: unless-stopped
command: api
ports:
- 5051:5001

depends_on:
- celery

Expand Down

0 comments on commit 9a27819

Please sign in to comment.