Skip to content

Commit 3e0d687

Browse files
Merge pull request #28 from aitomatic/fix/pass_no_of_jobs_to_list_api
fix: add size query parameter when calling list api
2 parents 7ceeafd + c5d320b commit 3e0d687

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/api/aitomatic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def start_app(self, app_name, data):
4848

4949
return res
5050

51-
def list_jobs(self, app_name):
51+
def list_jobs(self, app_name, size):
5252
res = requests.get(
53-
url=f"{self.API_BASE}/app/{app_name}/jobs",
53+
url=f"{self.API_BASE}/app/{app_name}/jobs?size={size}",
5454
headers={
5555
'Authorization': f'Bearer {self.token}',
5656
},

src/list/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def list(obj, app_name: str, n: int) -> None:
1414
click.echo(f"Listing all {app_name}'s jobs...\n")
1515

1616
api = AiCloudApi(token=obj.get("access_token"))
17-
res = api.list_jobs(app_name=app_name)
17+
res = api.list_jobs(app_name=app_name, size=n)
1818
data = res.json()
1919

2020
jobs = data['data']

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.2
1+
0.12.3

0 commit comments

Comments
 (0)