I'm attempting to look at the jobs for a GPService, but I get the following Attribute Error. I guess my question is "am I doing this right?" - I have a GPService that is an arcgis.gis.server.admin._services.Service, from which I get the JobManager, and from that, I thought, the jobs...
Maybe a more general way to frame the question is "how do I get all the jobs for a given GPService?"
Error:
jobs = service.jobs.search()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[28], line 1
----> 1 jobs = service.jobs.search()
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\server\admin\_services.py:2123, in JobManager.search(self, start_time, end_time, status, username, machine)
2119 results = []
2120 res = self._con.get(url, params)
2121 results = [
2122 Job(url="%s/%s" % (self._url, key), con=self._con)
-> 2123 for key in res["results"].keys()
2124 ]
2125 while res["nextStart"] > -1:
2126 params["start"] = res["nextStart"]
AttributeError: 'list' object has no attribute 'keys'