AnsweredAssumed Answered

Re-publishing map service

Question asked by snaperski on Dec 5, 2014

Hello!

 

I have issue with ArcGIS Server service re-publishing with arcpy. I am following this help here: ArcGIS Help (10.2, 10.2.1, and 10.2.2) ... and trying to republish my existing service by successfully changing my .sddraft file like that:

tagsType = doc.getElementsByTagName('Type')
for tagType in tagsType:
   if tagType.parentNode.tagName == 'SVCManifest':
   if tagType.hasChildNodes():
   tagType.firstChild.data = "esriServiceDefinitionType_Replacement"

tagsState = doc.getElementsByTagName('State')
for tagState in tagsState:
   if tagState.parentNode.tagName == 'SVCManifest':
   if tagState.hasChildNodes():
   tagState.firstChild.data = "esriSDState_Published"

 

But every it will rename existing service (adding timestamp suffix):

bug.jpg

 

So old services will just hang there and obviously no replacing takes place (need to use ArcGIS Help (10.2, 10.2.1, and 10.2.2)  afterwards?).

And not just services are proliferating... Since every time I will re-create tiles also, there will be new tile folder also in

arcgisserver\directories\arcgiscache. And I am using arcpy.ManageMapServerCacheTiles_server tool with DELETE_TILES option first and RECREATE_ALL_TILES secondly. 

 

So this is very bothering and I can't see how this archiving of old services and cache folders takes place.

 

Thanks!

Raivo Alla

Estonian Land Board

Outcomes