Skip to content

Commit

Permalink
Make job.list go through query parameters (#1467)
Browse files Browse the repository at this point in the history
* add filter query string
  • Loading branch information
akihikokuroda authored Aug 26, 2024
1 parent 48ac9dd commit 16bbfcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/qiskit_serverless/core/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,13 @@ def list(self, **kwargs) -> List["Job"]:
tracer = trace.get_tracer("client.tracer")
with tracer.start_as_current_span("job.list"):
limit = kwargs.get("limit", 10)
kwargs["limit"] = limit
offset = kwargs.get("offset", 0)
kwargs["offset"] = offset
response_data = safe_json_request(
request=lambda: requests.get(
f"{self.host}/api/{self.version}/jobs/?limit={limit}&offset={offset}",
f"{self.host}/api/{self.version}/jobs",
params=kwargs,
headers={"Authorization": f"Bearer {self._token}"},
timeout=REQUESTS_TIMEOUT,
)
Expand Down

0 comments on commit 16bbfcd

Please sign in to comment.