mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(glance): image stream worker count (#21538)
This commit is contained in:
@@ -92,7 +92,10 @@ func init() {
|
||||
}
|
||||
ImageManager.SetVirtualObject(ImageManager)
|
||||
|
||||
imgStreamingWorkerMan = appsrv.NewWorkerManager("image_streaming_worker", 10, 1024, true)
|
||||
}
|
||||
|
||||
func InitImageStreamWorkers() {
|
||||
imgStreamingWorkerMan = appsrv.NewWorkerManager("image_streaming_worker", options.Options.ImageStreamWorkerCount, 1024, true)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -51,6 +51,8 @@ type SImageOptions struct {
|
||||
S3BucketName string `help:"s3 bucket name" default:"onecloud-images"`
|
||||
S3MountPoint string `help:"s3fs mount point" default:"/opt/cloud/workspace/data/glance/s3images"`
|
||||
S3CheckImageStatus bool `help:"Enable s3 check image status"`
|
||||
|
||||
ImageStreamWorkerCount int `help:"Image stream worker count" default:"10"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -68,6 +68,8 @@ func StartService() {
|
||||
|
||||
common_options.StartOptionManager(opts, opts.ConfigSyncPeriodSeconds, api.SERVICE_TYPE, api.SERVICE_VERSION, options.OnOptionsChange)
|
||||
|
||||
models.InitImageStreamWorkers()
|
||||
|
||||
if opts.PortV2 > 0 {
|
||||
log.Infof("Port V2 %d is specified, use v2 port", opts.PortV2)
|
||||
opts.Port = opts.PortV2
|
||||
|
||||
Reference in New Issue
Block a user