Skip to content

Commit

Permalink
change it to info for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Apr 3, 2024
1 parent 1e5a4bc commit ca54327
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ def process_rawdata(file_download_url, aoi_id, feedback=False):
headers = {
'Referer': 'https://fair-dev.hotosm.org/' # TODO : Use request uri
}
logging.debug(f"Started downloading zip raw for {aoi_id} : {file_download_url}")
logging.info(f"Started downloading zip raw for {aoi_id} : {file_download_url}")
r = requests.get(file_download_url, headers=headers)
logging.debug(f"Downloaded zip raw for {aoi_id}")
logging.info(f"Downloaded zip raw for {aoi_id}")
# Check whether the export path exists or not
path = "temp/"
isExist = os.path.exists(path)
if not isExist:
os.makedirs(path)
file_temp_path = os.path.join(path, f"{str(uuid4())}.zip") # unique
open(file_temp_path, "wb").write(r.content)
logging.debug(f"Zip written to disk : {aoi_id}")
logging.info(f"Zip written to disk : {aoi_id}")

with ZipFile(file_temp_path, "r") as zipObj:
# Get a list of all archived file names from the zip
Expand Down Expand Up @@ -243,7 +243,7 @@ def process_geojson(geojson_file_path, aoi_id, feedback=False):
Raises:
ValidationErr: _description_
"""
logging.DEBUG("Geojson Processing Started for aoi {aoi_id} in {geojson_file_path}")
logging.info("Geojson Processing Started for aoi {aoi_id} in {geojson_file_path}")
if feedback:
foreign_key_id = FeedbackAOI.objects.get(id=aoi_id).training
else:
Expand All @@ -269,4 +269,4 @@ def process_geojson(geojson_file_path, aoi_id, feedback=False):
for f in tqdm(futures, total=len(data["features"])):
f.result()

logging.DEBUG("Raw data writing to database finished")
logging.info("Raw data writing to database finished")

0 comments on commit ca54327

Please sign in to comment.