From 5d57e93ee1a0fdc700774fbb176b58b69bd8dacc Mon Sep 17 00:00:00 2001
From: wangchuxiao <wangchuxiao97@outlook.com>
Date: Wed, 10 Aug 2022 20:11:04 +0800
Subject: [PATCH] fix delete

---
 cmd/{cron_task => open_im_cron_task}/Makefile |  2 +-
 cmd/{cron_task => open_im_cron_task}/main.go  |  0
 script/check_all.sh                           | 16 ++++++++--------
 script/path_info.cfg                          |  8 ++++++--
 script/start_rpc_service.sh                   |  2 +-
 5 files changed, 16 insertions(+), 12 deletions(-)
 rename cmd/{cron_task => open_im_cron_task}/Makefile (91%)
 rename cmd/{cron_task => open_im_cron_task}/main.go (100%)

diff --git a/cmd/cron_task/Makefile b/cmd/open_im_cron_task/Makefile
similarity index 91%
rename from cmd/cron_task/Makefile
rename to cmd/open_im_cron_task/Makefile
index ecbd6e128..0a0ff2967 100644
--- a/cmd/cron_task/Makefile
+++ b/cmd/open_im_cron_task/Makefile
@@ -1,6 +1,6 @@
 .PHONY: all build run gotool install clean help
 
-BINARY_NAME=cron_task
+BINARY_NAME=open_im_cron_task
 BIN_DIR=../../../bin/
 
 all: gotool build
diff --git a/cmd/cron_task/main.go b/cmd/open_im_cron_task/main.go
similarity index 100%
rename from cmd/cron_task/main.go
rename to cmd/open_im_cron_task/main.go
diff --git a/script/check_all.sh b/script/check_all.sh
index c036142f9..6dbe2c9d1 100644
--- a/script/check_all.sh
+++ b/script/check_all.sh
@@ -56,13 +56,13 @@ else
 fi
 
 
-#check=$(ps aux | grep -w ./${timer_task_name} | grep -v grep | wc -l)
-#if [ $check -ge 1 ]; then
-#  echo -e ${GREEN_PREFIX}"none  port has been listening,belongs service is openImMsgTimer"${COLOR_SUFFIX}
-#else
-#  echo -e ${RED_PREFIX}"openImMsgTimer service does not start normally"${COLOR_SUFFIX}
-#        echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
-#      exit -1
-#fi
+check=$(ps aux | grep -w ./${cron_task_name} | grep -v grep | wc -l)
+if [ $check -ge 1 ]; then
+  echo -e ${GREEN_PREFIX}"none  port has been listening,belongs service is cron_task_name"${COLOR_SUFFIX}
+else
+  echo -e ${RED_PREFIX}"cron_task_name service does not start normally"${COLOR_SUFFIX}
+        echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
+      exit -1
+fi
 
 echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
diff --git a/script/path_info.cfg b/script/path_info.cfg
index fd5c11319..6562f1d7f 100644
--- a/script/path_info.cfg
+++ b/script/path_info.cfg
@@ -27,6 +27,10 @@ demo_server_name="open_im_demo"
 demo_server_binary_root="../bin/"
 demo_server_source_root="../cmd/open_im_demo/"
 
+cron_task_name="open_im_cron_task"
+cron_task_binary_root="../bin/"
+cron_task_source_root="../cmd/open_im_cron_task/"
+
 
 #Global configuration file default dir
 config_path="../config/config.yaml"
@@ -48,7 +52,7 @@ service_source_root=(
   ../cmd/rpc/open_im_organization/
   ../cmd/rpc/open_im_conversation/
   ../cmd/rpc/open_im_cache/
-  ../cmd/cron_task
+  ../cmd/open_im_cron_task
   ${msg_gateway_source_root}
   ${msg_transfer_source_root}
   ${msg_source_root}
@@ -73,7 +77,7 @@ service_names=(
   open_im_organization
   open_im_conversation
   open_im_cache
-  cron_task
+  open_im_cron_task
   ${msg_gateway_name}
   ${msg_transfer_name}
   ${msg_name}
diff --git a/script/start_rpc_service.sh b/script/start_rpc_service.sh
index 4b26b24a4..433e3bbe5 100644
--- a/script/start_rpc_service.sh
+++ b/script/start_rpc_service.sh
@@ -22,7 +22,7 @@ service_filename=(
   open_im_organization
   open_im_conversation
   open_im_cache
-  cron_task
+  open_im_cron_task
 )
 
 #service config port name