From 5e6105a4172dcea9a6fd9c5d2e301d3d44441a8a Mon Sep 17 00:00:00 2001 From: Rudi Thoeni Date: Thu, 7 Dec 2023 10:00:43 +0100 Subject: [PATCH] fix gtfs deletion, gtfs file rename --- .github/workflows/execute.yml | 6 ++++-- gtfs-import-task/gtfs-download.sh | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/execute.yml b/.github/workflows/execute.yml index 52b0bdd0..2529d5a4 100644 --- a/.github/workflows/execute.yml +++ b/.github/workflows/execute.yml @@ -100,7 +100,8 @@ jobs: X_DRT_HOST: "https://drt.otp.opendatahub.testingmachine.eu/" X_CHARGER_HOST: "https://charger.otp.opendatahub.testingmachine.eu/" - X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit_shp.zip" + #X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit_shp.zip" + X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit.zip" X_GTFS_URL_UPDATETIME: "0 2 * * *" X_GTFS_WORKFLOW_AUTH_TOKEN: ${{ secrets.GH_WORKFLOW_ACCESS_TOKEN }} X_GTFS_WORKFLOW_DISPATCH_URL: "https://api.github.com/repos/noi-techpark/odh-mentor-otp/actions/workflows/run_calculate.yml/dispatches" @@ -212,7 +213,8 @@ jobs: X_DRT_HOST: "https://drt.otp.opendatahub.com/" X_CHARGER_HOST: "https://charger.otp.opendatahub.com/" - X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit_shp.zip" + #X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit_shp.zip" + X_GTFS_URL: "ftp://ftp.sta.bz.it/gtfs/google_transit.zip" X_GTFS_URL_UPDATETIME: "0 4 * * *" X_GTFS_WORKFLOW_AUTH_TOKEN: ${{ secrets.GH_WORKFLOW_ACCESS_TOKEN }} X_GTFS_WORKFLOW_DISPATCH_URL: "https://api.github.com/repos/noi-techpark/odh-mentor-otp/actions/workflows/run_calculate.yml/dispatches" diff --git a/gtfs-import-task/gtfs-download.sh b/gtfs-import-task/gtfs-download.sh index 4139b1b9..b717c231 100755 --- a/gtfs-import-task/gtfs-download.sh +++ b/gtfs-import-task/gtfs-download.sh @@ -33,7 +33,10 @@ if [ -f "${HASH_FILE}" ]; then OLD=$(cat $HASH_FILE) fi -if [ "${SHA}" = "${OLD}" ]; then +if [ ! -f /tmp/gtfs_$NEW_UUID.zip ]; then + echo "New gtfs file not found!" >> $LOGFILE + +elif [ "${SHA}" = "${OLD}" ]; then echo "${DATE} gtfs not changed!" >> $LOGFILE