diff --git a/tensorbay/client/version.py b/tensorbay/client/version.py index c4fc27cbc..a730b5044 100644 --- a/tensorbay/client/version.py +++ b/tensorbay/client/version.py @@ -643,14 +643,14 @@ def _delete_job(self, job_id: str) -> None: """ - def _generate_jobs( + def _list_jobs( self, job_type: str, status: Optional[str] = None, offset: int = 0, limit: int = 128, - ) -> Generator[Dict[str, Any], None, int]: - """Get a generator of :class:`Job`. + ) -> Dict[str, Any]: + """Get a dict about the list of :class:`Job`. Arguments: job_type: Type of the Job. @@ -659,10 +659,14 @@ def _generate_jobs( offset: The offset of the page. limit: The limit of the page. - Return: - The generator of job info. + Returns: + The dict of job info list. """ + params = {"jobType": job_type, "status": status, "offset": offset, "limit": limit} + + response = self._client.open_api_do("GET", "jobs", self._dataset_id, params=params) + return response.json() # type: ignore[no-any-return] class SquashAndMerge(JobMixin):