Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the MAX_BULK_UPDATE_SIZE to 5000 #21

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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