-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix(cron): Run harvester cron job in background (run and clean up log… #71
Conversation
…ging) - Create entrypoint script to export environment variables to /etc/profile.d/custom_env.sh - Update crontab to source environment variables from custom_env.sh - Start cron daemon in background and tail cron log to keep container running - Ensure CKAN cron jobs have necessary environment context Closes #67
ckan/Dockerfile.dev
Outdated
@@ -47,4 +59,4 @@ RUN for d in $APP_DIR/patches/*; do \ | |||
fi ; \ | |||
done | |||
|
|||
ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations gdi_userportal dcat harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester dcat_json_interface oidc_pkce fairdatapointharvester activity" | |||
ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets scheming_organizations gdi_userportal dcat harvest ckan_harvester dcat_rdf_harvester dcat_json_harvester dcat_json_interface oidc_pkce fairdatapointharvester activity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this missing a newline at the end of the file?
ckan/config/ckan_harvesting.conf
Outdated
stderr_logfile=/var/log/cron.log | ||
autostart=true | ||
autorestart=true | ||
startsecs=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at end of file?
BASH_ENV=/etc/profile.d/custom_env.sh | ||
|
||
# Every 15 minutes, run the harvester and clean the harvest log every day at 5am | ||
*/15 * * * * /usr/bin/ckan -c /srv/app/ckan.ini harvester run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do/can this be configurable through an environment flag?
#!/bin/sh | ||
|
||
# Dump environment variables to a file that will be sourced by cron | ||
printenv | sed 's/^\(.*\)$/export \1/g' > /etc/profile.d/custom_env.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at end of file?
Co-authored-by: kburger <[email protected]>
…ub.com/GenomicDataInfrastructure/gdi-userportal-ckan-docker into 67-gdi-ckan-harvesters-are-not-running
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Quality Gate passedIssues Measures |
Closes #67