mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(glance): image upload timeout (#19889)
This commit is contained in:
@@ -195,6 +195,14 @@ func (manager *SImageManager) InitializeData() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (manager *SImageManager) SetHandlerProcessTimeout(info *appsrv.SHandlerInfo, r *http.Request) time.Duration {
|
||||
if r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/images") {
|
||||
log.Debugf("upload image, set process timeout to 4 hour!!!")
|
||||
return 4 * time.Hour
|
||||
}
|
||||
return manager.SSharableVirtualResourceBaseManager.SetHandlerProcessTimeout(info, r)
|
||||
}
|
||||
|
||||
func (manager *SImageManager) GetPropertyDetail(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
appParams := appsrv.AppContextGetParams(ctx)
|
||||
appParams.OverrideResponseBodyWrapper = true
|
||||
|
||||
Reference in New Issue
Block a user