On Fri, 16 Jun 2017 14:21:34 +0200
Fabian Grünbichler <f.gruenbich...@proxmox.com> wrote:

> > my $limit = 10000; # limit for get requests  
> 
> this seems kind of arbitrary? if you really need such limit, you also
> need to implement pagination or something like it, otherwise you are in
> trouble.
> 
The reason for this is that the API has a default limit which is
configured to 20 and there is no way of knowing the number of rows in
the full dataset. Setting the number to this high level should prevent
having to loop. This was only chosen for the beta so the next patch
will have a loop requesting a batch at the time until an empty
resultset is returned.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
Don't comment bad code - rewrite it.
            - The Elements of Programming Style (Kernighan & Plaugher)

Attachment: pgpJD5utmYzar.pgp
Description: OpenPGP digital signature

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to