Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf36c0cc

Browse files
authored
Merge pull request#119 from EliahKagan/quadratic
Improve description of backoff sequence in `db.loose`
2 parents9e68ea1 +b4fd74c commitf36c0cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎gitdb/db/loose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,16 @@ def store(self, istream):
230230
# end rename only if needed
231231

232232
# Ensure rename is actually done and file is stable
233-
# Retry up to 14 times -exponential wait & retry in ms.
233+
# Retry up to 14 times -quadratic wait & retry in ms.
234234
# The total maximum wait time is 1000ms, which should be vastly enough for the
235235
# OS to return and commit the file to disk.
236-
forexp_backoff_msin [1,4,9,16,25,36,49,64,81,100,121,144,169,181]:
236+
forbackoff_msin [1,4,9,16,25,36,49,64,81,100,121,144,169,181]:
237237
withsuppress(PermissionError):
238238
# make sure its readable for all ! It started out as rw-- tmp file
239239
# but needs to be rwrr
240240
chmod(obj_path,self.new_objects_mode)
241241
break
242-
time.sleep(exp_backoff_ms/1000.0)
242+
time.sleep(backoff_ms/1000.0)
243243
else:
244244
raisePermissionError(
245245
"Impossible to apply `chmod` to file {}".format(obj_path)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp