zdavatz / aips2sqlite

aips2sqlite - create an SQLite DB from AIPS, Swissmedic, BAG and Refdata
6 stars 5 forks source link

do not use --nodown Option in production. #5

Closed zdavatz closed 5 years ago

zdavatz commented 5 years ago

The option --nodown is only used for testing. In production do not use the option --nodown. My full path and options are: /usr/local/src/jre1.8.0_101/bin/java -jar -Xmx6000m /home/zeno/.software/aips2sqlite/jars/aips2sqlite.jar --owner=Axapharm --plain --xml --lang=de --pinfo

jonaspu commented 5 years ago
50 0 * * * wget -o /dev/null -P /opt/ https://github.com/zdavatz/aips2sqlite/archive/master.zip && unzip -o /opt/master.zip -d /opt/ >/dev/null 2>&1 && rm /opt/master.zip >/dev/null 2>&1
00 1 * * * cd /srv/www/files/aips/ && java -jar -Xmx6000m /opt/aips2sqlite-master/jars/aips2sqlite.jar --owner=Axapharm --plain --xml --lang=de --pinfo >/dev/null 2>&1
15 1 * * * cd /srv/www/files/aips/ && java -jar -Xmx6000m /opt/aips2sqlite-master/jars/aips2sqlite.jar --nodown --owner=Axapharm --plain --xml --lang=fr --pinfo >/dev/null 2>&1
20 1 * * * cd /srv/www/files/aips/ && java -jar -Xmx6000m /opt/aips2sqlite-master/jars/aips2sqlite.jar --nodown --owner=Axapharm --plain --xml --lang=de >/dev/null 2>&1
25 1 * * * cd /srv/www/files/aips/ && java -jar -Xmx6000m /opt/aips2sqlite-master/jars/aips2sqlite.jar --nodown --owner=Axapharm --plain --xml --lang=fr >/dev/null 2>&1

This is what we do. Does the first call update all infos in the database or do we need to call without --nodown every time?

jonaspu commented 5 years ago

Resolved.

Old files were not deleted when generating new files. I.e. when a new patient-/fachinfo is released with a different name, the old file in the output folder remains.

Our solution was to delete the whole output folder before loading again.