Skip to content

Commit

Permalink
fixed key error on geojson on hdx exports
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Jul 25, 2022
1 parent 061dbbc commit 2e9ebbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hdx_exports/hdx_export_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ def hdx_note(self, theme):

def datasets(self,is_private,subnational,data_update_frequency,locations,files,public_dir):
HDX_FORMATS = {
'geojson':'geojson',
'GeoJSON':'geojson',
'shp': 'SHP',
'geopackage': 'Geopackage',
'garmin_img': 'Garmin IMG',
'kml': 'KML'
}

HDX_DESCRIPTIONS = {
'geojson': 'geojson',
'GeoJSON': 'geojson',
'shp':'ESRI Shapefile',
'geopackage':'Geopackage, SQLite compatible',
'garmin_img':'.IMG for Garmin GPS Devices (All OSM layers for area)',
Expand Down
4 changes: 4 additions & 0 deletions tasks/task_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def run_task(self, job_uid=None, user=None, ondemand=True): # noqa
# db.close_old_connections()
run_task_async_ondemand.send(run_uid)
else:
# run_task_remote(run_uid)
# db.close_old_connections()
run_task_async_scheduled.send(run_uid)
return run

Expand Down Expand Up @@ -113,6 +115,8 @@ def run_task_remote(run_uid):
try :
run_task(run_uid,run,stage_dir,download_dir)
except Exception as e:
client.captureException(extra={'run_uid': run_uid})
LOG.warn(traceback.format_exc())
LOG.warn('ExportRun {0} failed: {1}'.format(run_uid, e))
run.status = 'FAILED'
run.finished_at = timezone.now()
Expand Down

1 comment on commit 2e9ebbf

@kshitijrajsharma
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#407 This is expected to solve this issue partially , as it will have try except for run task

Please sign in to comment.