pull/265/head
wangchuxiao 2 years ago
parent edeb228315
commit cdc60ef5f0

@ -0,0 +1,23 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=cron_task
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi

@ -20,7 +20,6 @@ func StartCronTask() {
fmt.Println("config", config.Config.Mongo.ChatRecordsClearTime)
_, err := c.AddFunc(config.Config.Mongo.ChatRecordsClearTime, func() {
operationID := getCronTaskOperationID()
fmt.Println("start del msgs")
log.NewInfo(operationID, "start", utils.GetSelfFuncName())
userIDList, err := im_mysql_model.SelectAllUserID()
if err == nil {

@ -48,6 +48,7 @@ service_source_root=(
../cmd/rpc/open_im_organization/
../cmd/rpc/open_im_conversation/
../cmd/rpc/open_im_cache/
../cmd/cron_task
${msg_gateway_source_root}
${msg_transfer_source_root}
${msg_source_root}
@ -72,6 +73,7 @@ service_names=(
open_im_organization
open_im_conversation
open_im_cache
cron_task
${msg_gateway_name}
${msg_transfer_name}
${msg_name}

@ -22,6 +22,7 @@ service_filename=(
open_im_organization
open_im_conversation
open_im_cache
cron_task
)
#service config port name

Loading…
Cancel
Save