Don't Delete Service Definition Draft in arcpy.server.StageService

12-05-2017 02:30 PM
Status: Open
Labels (1)
Occasional Contributor III

I would like to automate republishing a hosted feature service in ArcGIS Online using arcpy.  Given the differences in the service definition draft produced when generating it through the normal publishing wizard and the default service definition produced by arcpy.mapping.CreateMapSDDraft, I thought it would make sense just to create one good service definition draft using the wizard and reuse it every time I generate the service definition file using arcpy.server.StageService.  The problem is that StageService cleans up after itself every time it runs.


Maybe I am missing something about .sd files, but it would be nice to have the option to keep the .sddraft file.  Obviously, the .sd file needs to be regenerated to refresh the data, but not the .sddraft.