add maximum retries when pushing (#334)

This commit is contained in:
Patrick Devine
2023-08-11 15:41:55 -07:00
committed by GitHub
parent 1556162c90
commit d9cf18e28d
4 changed files with 35 additions and 21 deletions

View File

@@ -277,7 +277,8 @@ func PushModelHandler(c *gin.Context) {
Password: req.Password,
}
if err := PushModel(req.Name, regOpts, fn); err != nil {
ctx := context.Background()
if err := PushModel(ctx, req.Name, regOpts, fn); err != nil {
ch <- gin.H{"error": err.Error()}
}
}()