Select to view content in your preferred language

How to check on cache job status

65
4
yesterday
SebastianBosbach
Occasional Contributor

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?

 

0 Kudos
4 Replies
ChrisUnderwood
Esri Regular Contributor

Hello @SebastianBosbach  , in ArcGIS Server Manager you can click on this View Cache Status button. Does that tell you what you need to know ?

ChrisUnderwood_0-1751386988007.png

 

0 Kudos
SebastianBosbach
Occasional Contributor

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.

0 Kudos
HaydenWelch
MVP Regular Contributor

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?

0 Kudos
SebastianBosbach
Occasional Contributor

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.

0 Kudos