fix: use printf replace the echo

This commit is contained in:
luhaoling 2024-02-27 10:17:52 +08:00
parent ce47f30b10
commit beeae4956d
2 changed files with 3 additions and 5 deletions

View File

@ -149,7 +149,7 @@ func (m *MsgTransfer) Start(prometheusPort int) error {
m.cancel()
m.historyCH.historyConsumerGroup.Close()
m.historyMongoCH.historyConsumerGroup.Close()
return nil
case <-netDone:
m.cancel()
m.historyCH.historyConsumerGroup.Close()
@ -157,6 +157,4 @@ func (m *MsgTransfer) Start(prometheusPort int) error {
close(netDone)
return netErr
}
return nil
}

View File

@ -1619,7 +1619,7 @@ openim::util::check_ports() {
# Print information about ports whose processes are not running.
if [[ ${#not_started[@]} -ne 0 ]]; then
echo "\n### Not started ports:"
printf "\n### Not started ports:"
for port in "${not_started[@]}"; do
openim::log::error "Port $port is not started."
done
@ -1627,7 +1627,7 @@ openim::util::check_ports() {
# Print information about ports whose processes are running.
if [[ ${#started[@]} -ne 0 ]]; then
echo "\n### Started ports:"
printf "\n### Started ports:"
for info in "${started[@]}"; do
echo "$info"
done