Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable delete_from_postgis when cleaning up after a failed upload #1058

Closed
ingenieroariel opened this issue Aug 27, 2013 · 3 comments
Closed
Assignees
Milestone

Comments

@ingenieroariel
Copy link
Member

The code in question is:

    try:
        cat.add_data_to_store(ds, name, data,
                              overwrite=overwrite,
                              charset=charset)
        return ds, cat.get_resource(name, store=ds)
    except Exception:
        # FIXME(Ariel): This is not a good idea, today there was a problem 
        # accessing postgis that caused add_data_to_store to fail,
        # for the same reasons the call to delete_from_postgis below failed too
        # I am commenting it out and filing it as an issue
        #delete_from_postgis(name)
        raise
@ingenieroariel
Copy link
Member Author

Options to fix it are for example adding specific types to Exception, in which cases delete_from_postgis is not expected to fail or adding an inner try/except block (most likely not a good idea according to the Zen of Python: Flat is better than nested")

@ghost ghost assigned groldan and ingenieroariel Aug 30, 2013
@ingenieroariel
Copy link
Member Author

I am punting this one for 2.1

@capooti
Copy link
Member

capooti commented Apr 16, 2014

What about re-adding it and see how things go?

@ingenieroariel ingenieroariel modified the milestone: 2.1 Apr 16, 2014
ppasq added a commit to ppasq/geonode that referenced this issue Feb 3, 2015
# By Tyler Garner (2) and others
# Via Jeffrey Johnson (1) and Tyler Garner (1)
* 'master' of https://github.com/GeoNode/geonode:
  Bump `geonode-user-accounts` version to 1.0.10.  Fixes GeoNode#1856.
  Add an inner try/except block when trying to clean up and delete_from_postgis. Closes GeoNode#1058
  Minor profile page enhancements.  Fixes GeoNode#1975.
  Updated changelog for version 2.4b16

Conflicts:
	geonode/static/geonode/css/base.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants