efulcher

Geoprocessing Service Not Saving Edits on 2nd run

Discussion created by efulcher on Feb 19, 2014
Latest reply on Mar 19, 2014 by crafty762
I have published a Python script as a geoprocessing service and am having issues saving edits.  We are calling the service from our web app.  The service processes an area and creates feature and table data based on a set of criteria.  The first time an area is processed, the script runs successfully.  However, when a 2nd area is processed, the area is processed successfully but fails when saving.  If I then restart the GP service and rerun the 2nd area - it processes and saves successfully.  A 3rd area would then fail.  Any ideas on things to try here?


plog("Opening Edit Session")
edit = arcpy.da.Editor(sdeConnection)
edit.startEditing(VERSIONED)
edit.startOperation()

{lot of operations}

    plog("Finished Appending") - gets here
    edit.stopOperation()
    edit.stopEditing(True)
    plog("Finished Editing")  - doe

Outcomes