FIX: ScheduleExecutionService::executeEntry endless loop when property null
This commit is contained in:
parent
8f92c986aa
commit
8e5d639bbe
@ -38,15 +38,17 @@ public class ScheduleExecutionService {
|
||||
}
|
||||
|
||||
private void executeEntry(final Schedule schedule, final ScheduleEntry entry, final ZonedDateTime now) {
|
||||
if (entry.getProperty() == null) {
|
||||
log.error("Cannot execute Schedule {}: No property set!", schedule);
|
||||
return;
|
||||
}
|
||||
entry.setLastClearTimestamp(entry.getNextClearTimestamp());
|
||||
log.info("Executing Schedule \"{}\" Entry {}", schedule.getTitle(), entry);
|
||||
propertyWriteService.writeToChannel(entry.getProperty(), entry.getValue());
|
||||
bulkExecutor.execute(entry.getBulk());
|
||||
entry.setLastClearTimestamp(entry.getNextClearTimestamp());
|
||||
scheduleCalculationService.calculateSchedule(schedule, now);
|
||||
if (entry.getProperty() != null) {
|
||||
log.debug("Schedule setting property: {} = {}", entry.getProperty().getTitle(), entry.getValue());
|
||||
propertyWriteService.writeToChannel(entry.getProperty(), entry.getValue());
|
||||
}
|
||||
if (entry.getBulk() != null) {
|
||||
log.debug("Schedule executing Bulk: {}", entry.getBulk());
|
||||
bulkExecutor.execute(entry.getBulk());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user