Hi,
I'm trying to automate uploading my scene services.
I tried the "new" way to publish them with pyhton like in this documentation:
https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/publish.htm
The upload works fine, but I have to wait till the cache generation is finished, before I can upload additional data.
Otherwise my server will be overloaded.
Some of the services take 1 hour to complete the cache generation, other take up to 14 hours.
So I want to check the job status, the cache_job_id is even returned by the example of esri, but I cant find a way to check for this job.
Can anyone link me the right documentions or an example?
Hello @SebastianBosbach , in ArcGIS Server Manager you can click on this View Cache Status button. Does that tell you what you need to know ?
No. First the cache job status of a scene layer isn't shown there. Second I need to automate the polling of the job with python, so even if the status would be shown there, going manual to the server manager wouldn't be my solution.
Most arcpy passthrough functions return a Result object. Those objects have a status value.
Edit: I see that the sharing function returns some REST endpoints. Can you ping those to test for completion? Just have a while loop that checks for 200 status at the endpoint?
Hi, thats exactly what I want to to.
From the documentation: "Returns a dictionary that includes the item URL, REST URL, and cache job ID."
But there is no additional info on how to use the job ID to get the job status, thats the thing I'm looking for help on.