mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add max option
This commit is contained in:
parent
2460d3856e
commit
68d079bdb2
@ -420,6 +420,7 @@ class Query(EnvLoader):
|
||||
* **type**: Comma-separated type of included payload: dir (or directory), link and/or file.
|
||||
* **brief**: Return just a list of matches, if True. Default: False
|
||||
* **offset**: Offset of the files
|
||||
* **max**: Maximum returned values. Default 1000.
|
||||
|
||||
Options:
|
||||
|
||||
@ -473,7 +474,7 @@ class Query(EnvLoader):
|
||||
|
||||
brief = kwargs.get("brief")
|
||||
pld_files = list() if brief else dict()
|
||||
for pld_data in self.db.get(PayloadFile)[offset:offset + 1000]:
|
||||
for pld_data in self.db.get(PayloadFile)[offset:offset + kwargs.get('max', 1000)]:
|
||||
if brief:
|
||||
pld_files.append(pld_data.path)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user