Skip to content

Commit

Permalink
fix rmtree
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-ram authored and maany committed Aug 8, 2024
1 parent e60d474 commit ad41922
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
2 changes: 1 addition & 1 deletion demo.sh
Original file line number Diff line number Diff line change
@@ -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
--sentinel_client_id dee33baf-3670-4c1a-a04e-60405c4cce75 --sentinel_client_secret EIkztfIPFH3IDBF7fWn8dFnqTt6Vjtnt

0 comments on commit ad41922

Please sign in to comment.