Merge pull request #750 from jmorganca/mxyng/concurrent-uploads

concurrent uploads
This commit is contained in:
Michael Yang
2023-11-01 15:00:01 -07:00
committed by GitHub
4 changed files with 294 additions and 196 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()}
}