indexing_lister: Allow to define flush packet size
Prior to this commit, indexing lister instances were flushing every packet of 20. This can now be defined per sub classes.
This commit is contained in:
parent
5ec3067b0d
commit
6662ae8db5
2 changed files with 6 additions and 2 deletions
|
@ -30,6 +30,9 @@ class BitBucketLister(IndexingHttpLister):
|
|||
if per_page != DEFAULT_BITBUCKET_PAGE:
|
||||
self.PATH_TEMPLATE = '%s&pagelen=%s' % (
|
||||
self.PATH_TEMPLATE, per_page)
|
||||
# to stay consistent with prior behavior (20 * 10 repositories then)
|
||||
self.flush_packet_db = int(
|
||||
(self.flush_packet_db * DEFAULT_BITBUCKET_PAGE) / per_page)
|
||||
|
||||
def get_model_from_repo(self, repo):
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue