Skip to content

Commit

Permalink
sync script
Browse files Browse the repository at this point in the history
  • Loading branch information
the-infinity committed Oct 29, 2024
1 parent f898996 commit 17e4fd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
from .resources import JsonWebAssetIOManager, LamassuResource, PostGISGeoPandasIOManager
from .resources.gdal import Ogr2OgrResource

assets = load_assets_from_modules([sharing, radvis, gtfs, traffic_incidents, webcams])
assets = load_assets_from_modules([
sharing,
radvis,
gtfs,
traffic_incidents,
webcams,
])

defs = Definitions(
assets=assets,
Expand Down
12 changes: 9 additions & 3 deletions scripts/download_webcams.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

set -eo pipefail
set -x

echo Download webcams
echo TODO implement logic
lftp --help
1>&2 echo 'Downloading webcam images'
lftp -e "mirror -c --parallel=20 --verbose / /var/webcam; quit;" -u $IPL_WEBCAM_USER,$IPL_WEBCAM_PASSWORD $IPL_WEBCAM_SERVER
# Delete all old webcam images
find /var/webcam -mtime +$WEBCAM_KEEP_DAYS -type f -name '*.jpeg' -delete
# Delete all empty directories
find /var/webcam -type d -empty -delete

0 comments on commit 17e4fd3

Please sign in to comment.