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
257ffeb9
Commit
257ffeb9
authored
Oct 12, 2023
by
Michael Yang
Browse files
fix download
parent
92578798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/download.go
server/download.go
+2
-2
No files found.
server/download.go
View file @
257ffeb9
...
...
@@ -144,7 +144,7 @@ func (b *blobDownload) run(ctx context.Context, requestURL *url.URL, opts *Regis
file
.
Truncate
(
b
.
Total
)
g
,
_
:=
errgroup
.
WithContext
(
ctx
)
g
,
inner
:=
errgroup
.
WithContext
(
ctx
)
g
.
SetLimit
(
numDownloadParts
)
for
i
:=
range
b
.
Parts
{
part
:=
b
.
Parts
[
i
]
...
...
@@ -156,7 +156,7 @@ func (b *blobDownload) run(ctx context.Context, requestURL *url.URL, opts *Regis
g
.
Go
(
func
()
error
{
for
try
:=
0
;
try
<
maxRetries
;
try
++
{
w
:=
io
.
NewOffsetWriter
(
file
,
part
.
StartsAt
())
err
:=
b
.
downloadChunk
(
ctx
,
requestURL
,
w
,
part
,
opts
)
err
:=
b
.
downloadChunk
(
inner
,
requestURL
,
w
,
part
,
opts
)
switch
{
case
errors
.
Is
(
err
,
context
.
Canceled
)
:
return
err
...
...
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