I have the following script that's supposed to stop locator services with a specific word in the name.
for server in gis_server:
if (server.url == 'https://arcgisserver/admin'):
for service in server.services.list():
if service.properties.type == 'GeocodeServer' and "parcel" in service.properties.serviceName:
service.stop()
print(service.properties["serviceName"] + ' stopped')Line #4 doesn't work, I don't get any errors but it doesn't stop the locator services that have the word "Parcel" in the name.
I have 3 locator services with the word "parcel":
- Composite_Parcel
- RegionalParcelLocator
- ABCCompositeParcel
How should I update line 4 to only stop the locator services that have "parcel" in the name?
TIA