-
Notifications
You must be signed in to change notification settings - Fork 165
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
cronjonb: simplify hugo cronjob by using rsync #1331
cronjonb: simplify hugo cronjob by using rsync #1331
Conversation
This PR simplifies the hugo cronjob by using rsync: - avoids need of tmp-dir - reduces rm/cp operations to single rsync call
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.
The rsync is indeed much more readable and cutting some time is nice.
ln -s /var/www/code_and_data/* /var/www/html/ && \ | ||
rmdir /var/www/html_new && \ | ||
(cd /var/www/html/ ; /home/neteler/bin/fix_link_timestamp.sh .) | ||
(cd /var/www/html/ ; /home/neteler/bin/fix_link_timestamp.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.
Not directly related to this PR, but is the timestamp fixing needed? I don't see the script in this repo. Maybe you have a comment there?
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.
It has been my (personal) policy to not damage timestamps when copying over files. I tried to carefully keep the server timestamps since the late 1990s :-) Random example: https://grass.osgeo.org/grass42/source/
The fix_link_timestamp.sh script I can add to this PR if desired.
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.
Lovely. Can you put there a comment that his makes the time stamps of the symlinks the same as time stamps of the original files? (If that's what this is doing.)
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.
Time stamp restore function included in 9963b61
Maybe we can merge it around the same time as #1330 and you can watch if the server explodes due to either of those PRs. |
I have already tested the latest PR version on grass.osgeo.org. Appears to successfully work. |
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.
Perfect!
The updated script is now in place on the server. |
Thanks! |
This PR simplifies the hugo cronjob by using rsync:
In tests on grass.osgeo.org this modified script needs approx 80% of the time the original script required.