Skip to content

Commit

Permalink
Use ASCENDING order for list_all query (#205)
Browse files Browse the repository at this point in the history
fixes #200
  • Loading branch information
abhijeetkaurav1st authored Dec 13, 2021
1 parent 909aba1 commit bc9dc6a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion calm/dsl/api/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@ def list_all(self, api_limit=250):
final_list = []
offset = 0
while True:
response, err = self.list(params={"length": api_limit, "offset": offset})
response, err = self.list(
params={
"length": api_limit,
"offset": offset,
"sort_attribute": "_created_timestamp_usecs_",
"sort_order": "ASCENDING",
}
)
if not err:
response = response.json()
else:
Expand Down

0 comments on commit bc9dc6a

Please sign in to comment.