mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
minio.Enable is not configured to use MinIO, therefore the image server is not checked
This commit is contained in:
parent
4f820df00d
commit
bdfe3ff6e9
@ -102,6 +102,12 @@ func main() {
|
|||||||
if !check.flag {
|
if !check.flag {
|
||||||
err = check.function(check.config)
|
err = check.function(check.config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if check.name == "Minio" {
|
||||||
|
if errors.Is(err, errMinioNotEnabled) {
|
||||||
|
fmt.Println("minio.Enable is not configured to use MinIO, therefore the image server is not checked")
|
||||||
|
checks[index].flag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
allSuccess = false
|
allSuccess = false
|
||||||
component.ErrorPrint(fmt.Sprintf("Starting %s failed:%v.", check.name, errs.Unwrap(err).Error()))
|
component.ErrorPrint(fmt.Sprintf("Starting %s failed:%v.", check.name, errs.Unwrap(err).Error()))
|
||||||
if !strings.Contains(errs.Unwrap(err).Error(), "connection refused") &&
|
if !strings.Contains(errs.Unwrap(err).Error(), "connection refused") &&
|
||||||
@ -125,6 +131,8 @@ func main() {
|
|||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var errMinioNotEnabled = errors.New("minio.Enable is not configured to use MinIO")
|
||||||
|
|
||||||
// checkMongo checks the MongoDB connection without retries
|
// checkMongo checks the MongoDB connection without retries
|
||||||
func checkMongo(config *config.GlobalConfig) error {
|
func checkMongo(config *config.GlobalConfig) error {
|
||||||
mongoStu := &component.Mongo{
|
mongoStu := &component.Mongo{
|
||||||
@ -155,7 +163,7 @@ func checkRedis(config *config.GlobalConfig) error {
|
|||||||
func checkMinio(config *config.GlobalConfig) error {
|
func checkMinio(config *config.GlobalConfig) error {
|
||||||
// Check if MinIO is enabled
|
// Check if MinIO is enabled
|
||||||
if config.Object.Enable != "minio" {
|
if config.Object.Enable != "minio" {
|
||||||
return errs.Wrap(errors.New("minio.Enable is empty"))
|
return errs.Wrap(errMinioNotEnabled)
|
||||||
}
|
}
|
||||||
minio := &component.Minio{
|
minio := &component.Minio{
|
||||||
ApiURL: config.Object.ApiURL,
|
ApiURL: config.Object.ApiURL,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user