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
0560b28a
Commit
0560b28a
authored
Oct 03, 2023
by
Michael Yang
Browse files
names
parent
10199c59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
server/download.go
server/download.go
+5
-5
No files found.
server/download.go
View file @
0560b28a
...
...
@@ -308,17 +308,17 @@ func downloadBlob(ctx context.Context, opts downloadOpts) error {
return
nil
}
value
,
ok
:=
blobDownloadManager
.
LoadOrStore
(
opts
.
digest
,
&
blobDownload
{
Name
:
fp
,
Digest
:
opts
.
digest
})
blobD
ownload
:=
value
.
(
*
blobDownload
)
data
,
ok
:=
blobDownloadManager
.
LoadOrStore
(
opts
.
digest
,
&
blobDownload
{
Name
:
fp
,
Digest
:
opts
.
digest
})
d
ownload
:=
data
.
(
*
blobDownload
)
if
!
ok
{
requestURL
:=
opts
.
mp
.
BaseURL
()
requestURL
=
requestURL
.
JoinPath
(
"v2"
,
opts
.
mp
.
GetNamespaceRepository
(),
"blobs"
,
opts
.
digest
)
if
err
:=
blobD
ownload
.
Prepare
(
ctx
,
requestURL
,
opts
.
regOpts
);
err
!=
nil
{
if
err
:=
d
ownload
.
Prepare
(
ctx
,
requestURL
,
opts
.
regOpts
);
err
!=
nil
{
return
err
}
go
blobD
ownload
.
Run
(
context
.
Background
(),
requestURL
,
opts
.
regOpts
)
go
d
ownload
.
Run
(
context
.
Background
(),
requestURL
,
opts
.
regOpts
)
}
return
blobD
ownload
.
Wait
(
ctx
,
opts
.
fn
)
return
d
ownload
.
Wait
(
ctx
,
opts
.
fn
)
}
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