Merge pull request 'by Robin at 20240411' (#269) from dev-feat-IRONFANS-70-Robin into feat-IRONFANS-70
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/269
This commit is contained in:
commit
78e22c4f59
|
@ -57,6 +57,7 @@ func (s *CronService) Init(c any) (err error) {
|
||||||
exec.RegTask("send_contact_customer_services_of_last_minute", s.SendContactCustomerServicesOfLastMinute)
|
exec.RegTask("send_contact_customer_services_of_last_minute", s.SendContactCustomerServicesOfLastMinute)
|
||||||
exec.RegTask("cancel_account_at_due_time", s.CancelAccountsAtDueTime)
|
exec.RegTask("cancel_account_at_due_time", s.CancelAccountsAtDueTime)
|
||||||
exec.RegTask("reload_moment_recomm_list", s.ReloadMomentRecommList)
|
exec.RegTask("reload_moment_recomm_list", s.ReloadMomentRecommList)
|
||||||
|
exec.RegTask("clear_zone_moment_create_times", s.ClearZoneMomentCreateTimes)
|
||||||
exec.LogHandler(customLogHandle)
|
exec.LogHandler(customLogHandle)
|
||||||
//注册任务handler
|
//注册任务handler
|
||||||
|
|
||||||
|
|
|
@ -423,3 +423,14 @@ func (s *CronService) ReloadMomentRecommList(ctx context.Context, param *xxl.Run
|
||||||
logger.Info("Refresh moment recommendation list cached in redis accomplished...")
|
logger.Info("Refresh moment recommendation list cached in redis accomplished...")
|
||||||
return "Refresh moment recommendation list cached in redis accomplished"
|
return "Refresh moment recommendation list cached in redis accomplished"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *CronService) ClearZoneMomentCreateTimes(ctx context.Context, param *xxl.RunReq) (msg string) {
|
||||||
|
logger.Info("task %v param: %v log_id: %v", param.ExecutorHandler, param.ExecutorParams, xxl.Int64ToStr(param.LogID))
|
||||||
|
logger.Info("Clearing zone_moment_create_times collection...")
|
||||||
|
if err := _DefaultZoneMomentCreateTimes.OpClear(&gin.Context{}); err != nil {
|
||||||
|
logger.Error("Clear zone_moment_create_times collection fail: %v", err)
|
||||||
|
return fmt.Sprintf("Clear zone_moment_create_times collection fail: %v", err)
|
||||||
|
}
|
||||||
|
logger.Info("zone_moment_create_times collection has been cleared")
|
||||||
|
return "zone_moment_create_times collection has been cleared"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue