예제 #1
0
파일: list.py 프로젝트: rountree/flux-core
    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]
예제 #2
0
파일: list.py 프로젝트: rountree/flux-core
 def get_jobinfos(self):
     for job in self.get_jobs():
         yield JobInfo(job)
예제 #3
0
파일: list.py 프로젝트: rountree/flux-core
    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()]
예제 #4
0
파일: list.py 프로젝트: rountree/flux-core
 def get_jobinfo(self):
     return JobInfo(self.get_job())