Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
72cd3364
Commit
72cd3364
authored
Nov 19, 2023
by
Jeffrey Morgan
Browse files
dont retry on upload complete context cancel
parent
1bd594b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
server/upload.go
server/upload.go
+4
-0
No files found.
server/upload.go
View file @
72cd3364
...
...
@@ -196,6 +196,10 @@ func (b *blobUpload) Run(ctx context.Context, opts *RegistryOptions) {
resp
,
err
:=
makeRequestWithRetry
(
ctx
,
http
.
MethodPut
,
requestURL
,
headers
,
nil
,
opts
)
if
err
!=
nil
{
b
.
err
=
err
if
errors
.
Is
(
err
,
context
.
Canceled
)
{
return
}
sleep
:=
time
.
Second
*
time
.
Duration
(
math
.
Pow
(
2
,
float64
(
try
)))
log
.
Printf
(
"%s complete upload attempt %d failed: %v, retrying in %s"
,
b
.
Digest
[
7
:
19
],
try
,
err
,
sleep
)
time
.
Sleep
(
sleep
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment