Skip to content

Commit

Permalink
Merge pull request #21 from lishengbao/lsb_dev
Browse files Browse the repository at this point in the history
Modify the MAX_BULK_UPDATE_SIZE to 5000
  • Loading branch information
eyehwan authored Mar 3, 2023
2 parents a82b566 + c2058ca commit 556c1c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion compass_contributor/contributor_dev_org_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
logger = logging.getLogger(__name__)
urllib3.disable_warnings()
page_size = 1000
MAX_BULK_UPDATE_SIZE = 5000

exclude_field_list = ["unknown", "-- undefined --"]

Expand Down Expand Up @@ -227,7 +228,7 @@ def processing_data(self, repo):
}
}
all_bulk_data.append(contributor_data)
if len(all_bulk_data) > 100:
if len(all_bulk_data) > MAX_BULK_UPDATE_SIZE:
helpers.bulk(client=self.client, actions=all_bulk_data)
all_bulk_data = []
helpers.bulk(client=self.client, actions=all_bulk_data)
Expand Down
2 changes: 1 addition & 1 deletion compass_metrics_model/metrics_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

logger = logging.getLogger(__name__)

MAX_BULK_UPDATE_SIZE = 10
MAX_BULK_UPDATE_SIZE = 5000

# [Fixme] In fact, origin should not be distinguished by this form of string.
# Maybe pass parameters through configuration file is better.
Expand Down
2 changes: 1 addition & 1 deletion compass_metrics_model/metrics_model_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from .utils import (get_uuid, get_date_list)

MAX_BULK_UPDATE_SIZE = 10
MAX_BULK_UPDATE_SIZE = 5000

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 556c1c1

Please sign in to comment.