dcsr-datumo / Theatre-de-societe

Project specific ontologies for the project Théatre de société
2 stars 1 forks source link

Dasch cache autoupdate #212

Closed loicjaouen closed 1 year ago

loicjaouen commented 1 year ago

fixes #211

loicjaouen commented 1 year ago
loicjaouen commented 1 year ago

graphdb wrapper was taking care of errors and did not generate files if any.

this is not the case now...

On prod there is a cron job running the cache updater container and copying the files into the application container.
So far it was using a:

${PODMAN_RUN} && for file in `ls ${LOCAL_CACHE}/*.json`; do sudo podman cp $file tds:/usr/share/nginx/html/cache/; done

replacing the for by a find checking for empty files:

5 3 * * 6       /usr/bin/podman run --env-file $(ENV_PROD) -v ${LOCAL_CACHE}:/app/output platec/tds_cache_updater:v2.0.0 && find ${LOCAL_CACHE} -name '*.json' -type f ! -size 0 -exec sudo podman cp {} tds:/usr/share/nginx/html/cache/ \;

re-enabling crontab and automatic cache update at 5 past 3 o'clock on saturday mornings.