冗余定时任务优化

This commit is contained in:
tianfeng 2025-11-17 17:26:36 +08:00
parent 087707df47
commit 45f7d6199d
8 changed files with 5 additions and 39 deletions

View File

@ -121,12 +121,6 @@ public class WeeklyRewardsSentManager {
// 上周国王王后奖励
sendLastWeekKingQueen(sysOriginPlatformEnum);
// CP
processSendRewardCp(sysOriginPlatformEnum, null);
// 代理活动 -
processSendRewardAgentActivity(sysOriginPlatformEnum, "WEEK", null);
});
log.warn("[execute] 每周奖励统一发送 end:{}", LocalDateTimeUtils.nowFormat("yyyy-MM-dd"));

View File

@ -27,7 +27,7 @@ import java.util.Map;
* @author pengshigang on 2022/8/19
*/
@Slf4j
@Component
//@Component
@AllArgsConstructor
public class DiamondToCoinsTask {

View File

@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
* @author pengshigang on 2021/7/24
*/
@Slf4j
@Component
//@Component
@AllArgsConstructor
public class FamilyLeaderboardInitTask {

View File

@ -27,7 +27,7 @@ import org.springframework.stereotype.Component;
* @author pengshigang on 2023/5/8.
*/
@Slf4j
@Component
//@Component
@AllArgsConstructor
public class GameKtvTask {

View File

@ -34,7 +34,7 @@ import org.springframework.stereotype.Component;
* @author pengshigang on 2021/9/27
*/
@Slf4j
@Component
//@Component
@AllArgsConstructor
public class GameRoomPkTask {

View File

@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
* @author pengshigang on 2021/10/27
*/
@Slf4j
@Component
//@Component
@AllArgsConstructor
public class MonthFixedActivityTask {

View File

@ -32,8 +32,6 @@ import org.springframework.stereotype.Component;
@AllArgsConstructor
public class ResetWeekStarGiftTask {
// private final EmailService emailService;
// private final ControlProperties controlProperties;
private final GiftConfigService giftConfigService;
private final WeekStarGiftService weekStarGiftService;
private final WeekStarCacheService weekStarCacheService;
@ -49,9 +47,6 @@ public class ResetWeekStarGiftTask {
long startTime = System.currentTimeMillis();
log.warn("exec reset_week_star_gift start");
printExecuteLog();
// sendEmail();
processWeekStar();
log.warn("exec reset_week_star_gift end with {}",System.currentTimeMillis()-startTime);
}
@ -75,25 +70,6 @@ public class ResetWeekStarGiftTask {
DateFormatEnum.yyyy_MM_dd_HH_mm_ss));
}
// private void sendEmail() {
// try {
// String nowAsiaRiyadh = ZonedDateTimeUtils
// .nowAsiaRiyadh(DateFormatEnum.yyyy_MM_dd_HH_mm_ss);
// String thisWeekMondayAsiaRiyadh = ZonedDateTimeUtils
// .format(ZonedDateTimeUtils.nowAsiaRiyadhWeekMonday(),
// DateFormatEnum.yyyy_MM_dd_HH_mm_ss);
// String nowUtc = LocalDateTimeUtils
// .nowFormat(DateFormatEnum.yyyy_MM_dd_HH_mm_ss.getPattern());
// emailService.sendSimpleMailMessage(controlProperties.getAlarmMailToString(),
// "执行周期周星",
// "执行时间AsiaRiyadh" + nowAsiaRiyadh
// + "UTC" + nowUtc
// + "本周一AsiaRiyadh" + thisWeekMondayAsiaRiyadh
// + ",本周一UTC" + LocalDateUtils.nowWeekMonday());
// } catch (Exception ex) {
// log.error("sendEmail fail:{}", ex.getMessage());
// }
// }
private String getStartDate() {
return LocalDateTimeUtils.nowFormat("dd/MM/yyyy");

View File

@ -52,10 +52,6 @@ public class WeeklyFixedActivityTask {
@Scheduled(cron = "5 0 0 ? * MON", zone = "Asia/Riyadh")
@TaskCacheLock(key = "WEEKLY_FIXED_ACTIVITY_TASK", expireSecond = 86400)
public void startWeekActivityTask() {
//调用其他每周活动因为有些活动需要过滤周星礼物
refreshWeekActivityManager.refreshWeeklyActivitiesWeekly();
//发送全部活动奖励 -
refreshWeekActivityManager.weeklyAllRewardsSent();