Optimizing scripts

pull/2100/head
skiffer-git 2 years ago
parent 2d4f7bbe17
commit b756959139

@ -15,18 +15,12 @@
package main
import (
_ "net/http/pprof"
"time"
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
_ "net/http/pprof"
)
func main() {
go func() {
time.Sleep(30 * time.Second)
panic("Panic after one minute!")
}()
apiCmd := cmd.NewApiCmd(cmd.ApiServer)
apiCmd.AddPortFlag()
apiCmd.AddPrometheusPortFlag()

@ -107,9 +107,10 @@ if [[ $? -ne 0 ]]; then
echo "$result"
exit 1
else
openim::util::find_ports_for_all_services ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}
openim::log::success "All OpenIM services are running normally! "
fi
openim::util::find_ports_for_all_services ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}

@ -72,7 +72,8 @@ function openim::push::start() {
for (( i=0; i<${#OPENIM_PUSH_PORTS_ARRAY[@]}; i++ )); do
openim::log::info "start push process, port: ${OPENIM_PUSH_PORTS_ARRAY[$i]}, prometheus port: ${PUSH_PROM_PORTS_ARRAY[$i]}"
cmd="${OPENIM_PUSH_BINARY} --port ${OPENIM_PUSH_PORTS_ARRAY[$i]} -c ${OPENIM_PUSH_CONFIG} --prometheus_port ${PUSH_PROM_PORTS_ARRAY[$i]}"
nohup ${cmd} >> "${LOG_FILE}" 2> >(tee -a "$TMP_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) >/dev/null &
#nohup ${cmd} >> "${LOG_FILE}" 2> >(tee -a "$TMP_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) >/dev/null &
nohup ${cmd} >> "${LOG_FILE}" 2> >(tee -a "$TMP_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) >> "${LOG_FILE}" 2>&1 &
#nohup ${OPENIM_PUSH_BINARY} --port ${OPENIM_PUSH_PORTS_ARRAY[$i]} -c ${OPENIM_PUSH_CONFIG} --prometheus_port ${PUSH_PROM_PORTS_ARRAY[$i]} >> ${LOG_FILE} 2> >(tee -a "${STDERR_LOG_FILE}" "$TMP_LOG_FILE" >&2) &
done
return 0

@ -123,7 +123,6 @@ fi
openim::util::find_ports_for_all_services ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}
openim::log::status "Start the post-start tools:"
${TOOLS_START_SCRIPTS_PATH} openim::tools::post-start
openim::log::status "post-start has been successfully completed!"

Loading…
Cancel
Save