Skip to content

Commit

Permalink
try to fetch list of hosts w/o details (#33)
Browse files Browse the repository at this point in the history
In http://projects.theforeman.org/issues/20072 a new param was added:
 thin
It allows to fetch a list of hosts w/o details, which makes fetching a
lot faster. And we need to fetch the full details later anyways.

Poor mans benchmark with about 100 hosts and patched Satellite:
sat6inventory runs 3:00min without the patch, 2:40min with the patch
  • Loading branch information
evgeni authored Dec 14, 2017
1 parent 7027d53 commit abd1aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sat6Inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class error_colors:
per_page = 100
while (page == 0 or int(jsonresult['per_page']) == len(jsonresult['results'])):
page += 1
q = [('page', page), ('per_page', per_page)]
q = [('page', page), ('per_page', per_page), ('thin', '1')]
if options.search:
q.append(('search', options.search))
if api_version == 2:
Expand Down

0 comments on commit abd1aee

Please sign in to comment.