From 60b7f16a177ac4f0f0903b30adaee814ca320677 Mon Sep 17 00:00:00 2001 From: Sam <78538841+spwoodcock@users.noreply.github.com> Date: Mon, 5 Aug 2024 11:44:12 +0100 Subject: [PATCH] fix: do not continue to poll raw-data-api on failure (#28) --- osm_rawdata/postgres.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osm_rawdata/postgres.py b/osm_rawdata/postgres.py index 891a874..9770a10 100755 --- a/osm_rawdata/postgres.py +++ b/osm_rawdata/postgres.py @@ -580,6 +580,10 @@ def queryRemote( log.debug(f"Current status: {response_status}") + # First check to see if FAILURE and stop polling + if response_status == "FAILURE": + break + # response_status options: STARTED, PENDING, SUCCESS if ( response_status != "SUCCESS"