Skip to content

Commit

Permalink
chore: scheduler test
Browse files Browse the repository at this point in the history
  • Loading branch information
clean2001 committed Nov 5, 2024
1 parent 463f0a5 commit a23dd78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class DeliveryNotificationScheduler {
private final NotificationService notificationService;

@SchedulerLock(name = "shedLock_notify_delivery", lockAtLeastFor = "1m", lockAtMostFor = "59m")
@Scheduled(cron = "0 0 15 * * *")
@Scheduled(cron = "0 0 7 * * *")
public void notifyTodayDelivery() {
notificationService.notifyTodayDelivery();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void notifyTodayDelivery() {
Long todayCount = orderFeign.getDeliveryCountByFarmId(farm.getId(), LocalDate.now().toString());
Long tomorrowCount = orderFeign.getDeliveryCountByFarmId(farm.getId(), LocalDate.now().plusDays(1).toString());

if(todayCount == 0L || tomorrowCount == 0L) {
if(todayCount == 0L && tomorrowCount == 0L) {
continue;
}

Expand Down

0 comments on commit a23dd78

Please sign in to comment.