冗余定时任务优化
This commit is contained in:
parent
087707df47
commit
45f7d6199d
@ -121,12 +121,6 @@ public class WeeklyRewardsSentManager {
|
|||||||
// 上周国王王后奖励
|
// 上周国王王后奖励
|
||||||
sendLastWeekKingQueen(sysOriginPlatformEnum);
|
sendLastWeekKingQueen(sysOriginPlatformEnum);
|
||||||
|
|
||||||
// CP
|
|
||||||
processSendRewardCp(sysOriginPlatformEnum, null);
|
|
||||||
|
|
||||||
// 代理活动 - 周
|
|
||||||
processSendRewardAgentActivity(sysOriginPlatformEnum, "WEEK", null);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
log.warn("[execute] 每周奖励统一发送 end:{}", LocalDateTimeUtils.nowFormat("yyyy-MM-dd"));
|
log.warn("[execute] 每周奖励统一发送 end:{}", LocalDateTimeUtils.nowFormat("yyyy-MM-dd"));
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import java.util.Map;
|
|||||||
* @author pengshigang on 2022/8/19
|
* @author pengshigang on 2022/8/19
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DiamondToCoinsTask {
|
public class DiamondToCoinsTask {
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author pengshigang on 2021/7/24
|
* @author pengshigang on 2021/7/24
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class FamilyLeaderboardInitTask {
|
public class FamilyLeaderboardInitTask {
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author pengshigang on 2023/5/8.
|
* @author pengshigang on 2023/5/8.
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class GameKtvTask {
|
public class GameKtvTask {
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author pengshigang on 2021/9/27
|
* @author pengshigang on 2021/9/27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class GameRoomPkTask {
|
public class GameRoomPkTask {
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author pengshigang on 2021/10/27
|
* @author pengshigang on 2021/10/27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class MonthFixedActivityTask {
|
public class MonthFixedActivityTask {
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,6 @@ import org.springframework.stereotype.Component;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ResetWeekStarGiftTask {
|
public class ResetWeekStarGiftTask {
|
||||||
|
|
||||||
// private final EmailService emailService;
|
|
||||||
// private final ControlProperties controlProperties;
|
|
||||||
private final GiftConfigService giftConfigService;
|
private final GiftConfigService giftConfigService;
|
||||||
private final WeekStarGiftService weekStarGiftService;
|
private final WeekStarGiftService weekStarGiftService;
|
||||||
private final WeekStarCacheService weekStarCacheService;
|
private final WeekStarCacheService weekStarCacheService;
|
||||||
@ -49,9 +47,6 @@ public class ResetWeekStarGiftTask {
|
|||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
log.warn("exec reset_week_star_gift start");
|
log.warn("exec reset_week_star_gift start");
|
||||||
printExecuteLog();
|
printExecuteLog();
|
||||||
|
|
||||||
// sendEmail();
|
|
||||||
|
|
||||||
processWeekStar();
|
processWeekStar();
|
||||||
log.warn("exec reset_week_star_gift end with {}",System.currentTimeMillis()-startTime);
|
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));
|
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() {
|
private String getStartDate() {
|
||||||
return LocalDateTimeUtils.nowFormat("dd/MM/yyyy");
|
return LocalDateTimeUtils.nowFormat("dd/MM/yyyy");
|
||||||
|
|||||||
@ -52,10 +52,6 @@ public class WeeklyFixedActivityTask {
|
|||||||
@Scheduled(cron = "5 0 0 ? * MON", zone = "Asia/Riyadh")
|
@Scheduled(cron = "5 0 0 ? * MON", zone = "Asia/Riyadh")
|
||||||
@TaskCacheLock(key = "WEEKLY_FIXED_ACTIVITY_TASK", expireSecond = 86400)
|
@TaskCacheLock(key = "WEEKLY_FIXED_ACTIVITY_TASK", expireSecond = 86400)
|
||||||
public void startWeekActivityTask() {
|
public void startWeekActivityTask() {
|
||||||
|
|
||||||
//调用其他每周活动,因为有些活动需要过滤周星礼物
|
|
||||||
refreshWeekActivityManager.refreshWeeklyActivitiesWeekly();
|
|
||||||
|
|
||||||
//发送全部活动奖励 - 周
|
//发送全部活动奖励 - 周
|
||||||
refreshWeekActivityManager.weeklyAllRewardsSent();
|
refreshWeekActivityManager.weeklyAllRewardsSent();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user