Esempio n. 1
0
    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]
Esempio n. 2
0
 def get_jobinfos(self):
     for job in self.get_jobs():
         yield JobInfo(job)
Esempio n. 3
0
    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()]
Esempio n. 4
0
 def get_jobinfo(self):
     return JobInfo(self.get_job())