I have a mosaic dataset that points to a folder that contains a single NetCDF.
I have a script that:
This appears to be working fine. However if I publish an image service from this Mosaic Dataset, the script fails to run as the image service has a lock on the mosaic dataset.
Is there a workaround to this or will I also have to include a start/stop image service (using Python Admin API I presume) into my script?
This particular example is just a test run with a file that only changes daily, but I have a requirement to work with another dataset on the FTP that changes on a 30 minute interval. Stopping and starting the service is going to interrupt users workflows downstream of the image service.
Solved! Go to Solution.
In the image service parameters (via server manager) there is an option to select 'has live data.' This is likely what you need.
When new rasters are added to the mosaic dataset of an image service, the image service information such as source resolution, spatial extent, multidimensional information, and time extent may become outdated. You can restart the service to reflect data changes. However, if you cannot incur any down time, select this option to reflect data changes without restarting the service. |
Have you looked into disabling schema locking? I'm not sure if that's relevant for image services, but it's worth taking a look.
Good tip, but no luck. I can also replicate if I also have ArcGIS Pro open with the MD in a map when trying to run the script from a separate instance of PyCharm.
In the image service parameters (via server manager) there is an option to select 'has live data.' This is likely what you need.
When new rasters are added to the mosaic dataset of an image service, the image service information such as source resolution, spatial extent, multidimensional information, and time extent may become outdated. You can restart the service to reflect data changes. However, if you cannot incur any down time, select this option to reflect data changes without restarting the service. |
You gun! Cheers Angus