-
Notifications
You must be signed in to change notification settings - Fork 0
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
limit days at webcam download #186
base: main
Are you sure you want to change the base?
Conversation
07e42b8
to
6a8336a
Compare
@@ -8,5 +8,7 @@ set -x | |||
find /var/webcam -mtime +$IPL_WEBCAM_KEEP_DAYS -type f -delete | |||
# Delete all empty directories | |||
find /var/webcam -type d -empty -delete | |||
# Download all new files | |||
lftp -e "mirror -c --parallel=$IPL_WEBCAM_WORKER --verbose / /var/webcam; quit;" -u $IPL_WEBCAM_USER,$IPL_WEBCAM_PASSWORD $IPL_WEBCAM_SERVER | |||
# Download all new files. Limit to now -(DOWNLOAD_MAX_DAYS - 1) days, otherwise we would delete and re-download data |
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.
Can you elaborate a bit more? Is this because because now - 6 days
effectively describes a time span of 7 days because the calculation is only precise to the day?
@@ -8,5 +8,7 @@ set -x | |||
find /var/webcam -mtime +$IPL_WEBCAM_KEEP_DAYS -type f -delete | |||
# Delete all empty directories | |||
find /var/webcam -type d -empty -delete | |||
# Download all new files | |||
lftp -e "mirror -c --parallel=$IPL_WEBCAM_WORKER --verbose / /var/webcam; quit;" -u $IPL_WEBCAM_USER,$IPL_WEBCAM_PASSWORD $IPL_WEBCAM_SERVER | |||
# Download all new files. Limit to now -(DOWNLOAD_MAX_DAYS - 1) days, otherwise we would delete and re-download data |
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.
# Download all new files. Limit to now -(DOWNLOAD_MAX_DAYS - 1) days, otherwise we would delete and re-download data | |
# Download all new files. Limit to now -(IPL_WEBCAM_KEEP_DAYS - 1) days, otherwise we would delete and re-download data |
Turns out, that the data source changed the amount of days they offer, which ended up into deleting and redownloading all files older then 7 days all the time, which again blocked necessary ports. This MR prevents this.