diff --git a/app/scraper.py b/app/scraper.py index 4a32f4d..1f3e85f 100644 --- a/app/scraper.py +++ b/app/scraper.py @@ -313,5 +313,8 @@ def scrape( except Exception as error: logger.error(f"{job_id}: Unable to scrape data. Job with tracer_id {tracer_id} failed. Error:\n{error}") job_state = BaseJobState.FAILED - shutil.rmtree(image_dir) + try: + shutil.rmtree(image_dir) + except Exception as e: + print("could not delete .tmp dir") #job.messages.append(f"Status: FAILED. Unable to scrape data. {e}") \ No newline at end of file diff --git a/demo.sh b/demo.sh index 09429e2..d8c4fc6 100755 --- a/demo.sh +++ b/demo.sh @@ -1,3 +1,3 @@ python sentinel_scraper.py --start_date=2023-8-8 --end_date=2023-8-30 --long_left=-156.708984 --lat_up=20.759645 --long_right=-156.299744 --lat_down=20.955027 --log-level="INFO" \ --kp_auth_token test123 --kp_host localhost --kp_port 8000 --kp_scheme http \ - --sentinel_client_id ab5cf2a1-cf8d-4423-89d3-b5b05659ffb5 --sentinel_client_secret 76Wvuf6q3pivLWcOypt2L1FW39dEvl9W \ No newline at end of file + --sentinel_client_id dee33baf-3670-4c1a-a04e-60405c4cce75 --sentinel_client_secret EIkztfIPFH3IDBF7fWn8dFnqTt6Vjtnt \ No newline at end of file