mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
Exit with code 1 when the check script fails
This commit is contained in:
parent
a2de9d42eb
commit
69bc4aea24
@ -17,12 +17,12 @@ package third
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/protocol/third"
|
"github.com/OpenIMSDK/protocol/third"
|
||||||
"github.com/OpenIMSDK/tools/discoveryregistry"
|
"github.com/OpenIMSDK/tools/discoveryregistry"
|
||||||
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
||||||
|
|||||||
@ -16,8 +16,8 @@ package mgo
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
|
||||||
|
|
||||||
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
"github.com/OpenIMSDK/tools/mgoutil"
|
"github.com/OpenIMSDK/tools/mgoutil"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
|
|||||||
@ -18,16 +18,16 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
|
||||||
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
|
|
||||||
|
|
||||||
"github.com/OpenIMSDK/protocol/constant"
|
"github.com/OpenIMSDK/protocol/constant"
|
||||||
"github.com/OpenIMSDK/protocol/msg"
|
"github.com/OpenIMSDK/protocol/msg"
|
||||||
"github.com/OpenIMSDK/protocol/sdkws"
|
"github.com/OpenIMSDK/protocol/sdkws"
|
||||||
"github.com/OpenIMSDK/tools/discoveryregistry"
|
"github.com/OpenIMSDK/tools/discoveryregistry"
|
||||||
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
"github.com/OpenIMSDK/tools/log"
|
"github.com/OpenIMSDK/tools/log"
|
||||||
"github.com/OpenIMSDK/tools/utils"
|
"github.com/OpenIMSDK/tools/utils"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
|
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -31,7 +31,6 @@ if openim::util::is_running_in_container; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OPENIM_VERBOSE=4
|
OPENIM_VERBOSE=4
|
||||||
|
|
||||||
openim::log::info "\n# Begin to check all openim service"
|
openim::log::info "\n# Begin to check all openim service"
|
||||||
@ -105,6 +104,7 @@ if [[ $? -ne 0 ]]; then
|
|||||||
echo "+++ cat openim log file >>> ${LOG_FILE}"
|
echo "+++ cat openim log file >>> ${LOG_FILE}"
|
||||||
openim::log::error "check process failed.\n "
|
openim::log::error "check process failed.\n "
|
||||||
echo "$result"
|
echo "$result"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
openim::log::success "All openim services are running normally! "
|
openim::log::success "All openim services are running normally! "
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -67,6 +67,7 @@ if openim::util::is_running_in_container; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
openim::golang::check_openim_binaries
|
openim::golang::check_openim_binaries
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
openim::log::error "OpenIM binaries are not found. Please run 'make build' to build binaries."
|
openim::log::error "OpenIM binaries are not found. Please run 'make build' to build binaries."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user