From: Dan White Date: Sun, 18 Aug 2024 01:11:31 +0000 (-0500) Subject: do-updates: fixup venv and verbose script timing X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;p=scheduling-bazaar-data.git do-updates: fixup venv and verbose script timing --- diff --git a/do-updates.sh b/do-updates.sh index eb5e13f..379602c 100755 --- a/do-updates.sh +++ b/do-updates.sh @@ -2,6 +2,11 @@ # update SatNOGS observations archive + +function utcdate() { + date -u '+%Y-%m-%d %H:%M:%SZ' +} + cd ~/ed/scheduling-bazaar cd data @@ -10,21 +15,24 @@ cd data #conda activate bazaar # (now) using python virtual environment -. ../.direnv/python-3.10.6/bin/activate +. ../.direnv/python-3.10.12/bin/activate #python -c 'import skyfield; print(skyfield.__version__)' #python -c 'import sgp4; print(sgp4.__version__)' +utcdate echo "*** Fetching database items" ../python-files/get-db.sh +utcdate echo "*** Fetching stations info" ../python-files/get-stations.py stations.json # and update the stations SQLite database for analysis ../python-files/update-stations stations.json stations.db echo +utcdate echo "*** Getting observations" #../python-files/get-observations.py --fetch observations.db #../python-files/get-observations.py --fetch --retry-unknown observations.db @@ -35,12 +43,17 @@ echo "*** Getting observations" # lag by 1 week to let some updates settle down date_end="$(date -u --date='1 week ago' '+%Y-%m-%dT%H:%M')" -../python-files/get-observations.py --fetch --pages 300 --end="$date_end" observations.db demoddata.db +utcdate +../python-files/get-observations.py --fetch --pages 300 --end="$date_end" observations.db demoddata.db || true +# ignore bad exit (throttled API) # what changed? #git diff +utcdate git add db-*.json stations.json + +utcdate git commit -m 'cron update info' exit