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
f020e1d5
"vscode:/vscode.git/clone" did not exist on "02e79a3da9d2dee480f66536f62dd408c1d71266"
Commit
f020e1d5
authored
Aug 14, 2023
by
Bruce MacDonald
Browse files
always remove from in progress map on download
parent
74f00474
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
server/download.go
server/download.go
+1
-2
No files found.
server/download.go
View file @
f020e1d5
...
@@ -113,6 +113,7 @@ var chunkSize = 1024 * 1024 // 1 MiB in bytes
...
@@ -113,6 +113,7 @@ var chunkSize = 1024 * 1024 // 1 MiB in bytes
// doDownload downloads a blob from the registry and stores it in the blobs directory
// doDownload downloads a blob from the registry and stores it in the blobs directory
func
doDownload
(
ctx
context
.
Context
,
mp
ModelPath
,
regOpts
*
RegistryOptions
,
f
*
FileDownload
,
fn
func
(
api
.
ProgressResponse
))
error
{
func
doDownload
(
ctx
context
.
Context
,
mp
ModelPath
,
regOpts
*
RegistryOptions
,
f
*
FileDownload
,
fn
func
(
api
.
ProgressResponse
))
error
{
defer
inProgress
.
Delete
(
f
.
Digest
)
var
size
int64
var
size
int64
fi
,
err
:=
os
.
Stat
(
f
.
FilePath
+
"-partial"
)
fi
,
err
:=
os
.
Stat
(
f
.
FilePath
+
"-partial"
)
...
@@ -208,8 +209,6 @@ outerLoop:
...
@@ -208,8 +209,6 @@ outerLoop:
inProgress
.
Store
(
f
.
Digest
,
f
)
inProgress
.
Store
(
f
.
Digest
,
f
)
}
}
inProgress
.
Delete
(
f
.
Digest
)
log
.
Printf
(
"success getting %s
\n
"
,
f
.
Digest
)
log
.
Printf
(
"success getting %s
\n
"
,
f
.
Digest
)
return
nil
return
nil
}
}
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