def jobs(self): """Synchronously fetch a list of JobInfo objects from JobList query If the Future object returned by JobList.fetch_jobs has not yet been fulfilled (e.g. is_ready() returns False), then this call may block. Otherwise, returns a list of JobInfo objects for all jobs returned from the underlying job listing RPC. """ rpc = self.fetch_jobs() jobs = rpc.get_jobs() if hasattr(rpc, "errors"): self.errors = rpc.errors return [JobInfo(job) for job in jobs]
def get_jobinfos(self): for job in self.get_jobs(): yield JobInfo(job)
def get_jobinfos(self): """get all successful results as list of JobInfo objects Any errors are appended to self.errors. """ return [JobInfo(job) for job in self.get_jobs()]
def get_jobinfo(self): return JobInfo(self.get_job())