add logs
This commit is contained in:
parent
68a1a4d9d9
commit
520233356b
1 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ import com.hazelcast.core.HazelcastInstance;
|
|||
import com.hazelcast.core.IMap;
|
||||
import com.hazelcast.query.Predicate;
|
||||
import com.hazelcast.query.Predicates;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -23,6 +25,7 @@ import static ru.spcex.clearing.scheduler.ISchedulerChecker.*;
|
|||
|
||||
@Service
|
||||
public class PlannerAllTodayMaker {
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
private final HazelcastInstance hazelcastInstance;
|
||||
private final IMap<Long, Planner> plannerMap;
|
||||
private final IMap<Long, ClearingCalendar> clearingCalendarMap;
|
||||
|
|
@ -43,6 +46,7 @@ public class PlannerAllTodayMaker {
|
|||
List<PlannerAllToday> listOfPlannerAllToday = new ArrayList<>();
|
||||
|
||||
if (!plannerMap.isEmpty()) listOfPlannerAllToday.addAll(getPlannersAllTodayToDate(currentDate));
|
||||
log.info("For today find {} plannerTemplates satisfying rules", listOfPlannerAllToday.size());
|
||||
|
||||
plannerMap.values().stream()
|
||||
.filter(x -> isValidPlanner(x, currentDate)).forEach((planner) -> {
|
||||
|
|
@ -61,6 +65,7 @@ public class PlannerAllTodayMaker {
|
|||
plannerAllToday.setId(hazelcastInstance.getIdGenerator(MAP_SEQUENCE_NAME).newId());
|
||||
plannerAllTodayMap.put(plannerAllToday.getId(), plannerAllToday);
|
||||
});
|
||||
log.info("Created {} plannerAllTodays", plannerAllTodayMap.size());
|
||||
}
|
||||
|
||||
private PlannerAllToday getFirstObjectByFieldValues(Map<String, ? extends Comparable<?>> conditions) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue