-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature: Install popular-scripts as a cronjob #59
Conversation
3e348be
to
3ce7053
Compare
3ce7053
to
a8aba23
Compare
if [ ! -e "${POPULAR_SCRIPTS_FILE}" ];then | ||
generate_popular_scripts | ||
fi | ||
# if [ ! -e "${POPULAR_SCRIPTS_FILE}" ];then |
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.
I think you commented out the wrong thing.
You left the "add crontab" if block
But commented out the "perform popular_scripts job" if block
If you run this, it will add the cron job but not run the actual job when the file is missing, and the electrs run command will fail when it tries to run the cache operations on a file that doesn't exist.
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.
Also, switching the if block you comment out will change the behavior from
"Always run the popular_script job before running electrs" (current)
to
"Only run the popular_script job when the file doesn't exist. Otherwise, the cron job should have kept the file up to date for us so we shouldn't need to run it" (This PR)
This adds:
I am shell noob, be kind.