cron.go 599 Bytes
Newer Older
hujiebin's avatar
hujiebin committed
1 2 3 4 5 6
package cron

import (
	"git.hilo.cn/hilo-common/resource/config"
	"hilo-user/cron/cp_cron"
	"hilo-user/cron/gift_cron"
7
	"hilo-user/cron/user_cron"
hujiebin's avatar
hujiebin committed
8 9 10
)

func Init() {
11
	user_cron.SyncGiftRecommendUsers() // 同步送礼推荐用户,多进程都需要执行
hujiebin's avatar
hujiebin committed
12 13 14
	if !config.IsMaster() {
		return
	}
hujiebin's avatar
hujiebin committed
15 16 17
	//gift_cron.SendGiftEventInit() // 礼物消息
	//gift_cron.GiftRemark()        // 礼物消息补偿
	gift_cron.SendGiftEvent() // 送礼事件
hujiebin's avatar
hujiebin committed
18 19
	cp_cron.ClearCpExpire()       // 清理过期cp
	cp_cron.CpAnniversaryNotice() // cp纪念日
chenweijian's avatar
chenweijian committed
20
	cp_cron.CpInviteCancelInit()  // cp邀请、解除到期结算
hujiebin's avatar
hujiebin committed
21
}