Skip to content

Commit

Permalink
client: fix line length
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Oct 18, 2023
1 parent 2841169 commit 1dcc56e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ def submit_contributions(
# submit contributions
if contribs:
total, total_processed = 0, 0
max_contribs = 1000 # TODO this should be set dynamically from `bulk_update_limit`
nmax = 1000 # TODO this should be set dynamically from `bulk_update_limit`

def post_future(track_id, payload):
future = self.session.post(
Expand Down Expand Up @@ -2122,7 +2122,7 @@ def put_future(pk, payload):
else:
next_post_chunk = post_chunk + [c]
next_payload = ujson.dumps(next_post_chunk).encode("utf-8")
if len(next_post_chunk) > max_contribs or len(next_payload) >= MAX_PAYLOAD:
if len(next_post_chunk) > nmax or len(next_payload) >= MAX_PAYLOAD:
if post_chunk:
payload = ujson.dumps(post_chunk).encode("utf-8")
futures.append(post_future(idx, payload))
Expand Down

0 comments on commit 1dcc56e

Please sign in to comment.