concurrent uploads

This commit is contained in:
Michael Yang
2023-10-09 10:24:27 -07:00
parent 3a1ed9ff70
commit 4e09aab8b9
4 changed files with 280 additions and 202 deletions

View File

@@ -365,7 +365,9 @@ func PushModelHandler(c *gin.Context) {
Insecure: req.Insecure,
}
ctx := context.Background()
ctx, cancel := context.WithCancel(c.Request.Context())
defer cancel()
if err := PushModel(ctx, req.Name, regOpts, fn); err != nil {
ch <- gin.H{"error": err.Error()}
}