From 5952871a3eec5115e541a1e1ae3c0fbc118508bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Wed, 26 Oct 2022 20:06:21 +0200 Subject: [PATCH] #8 bulk execution didn't respect Bulk::enabled --- src/main/java/de/ph87/homeautomation/bulk/BulkExecutor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/de/ph87/homeautomation/bulk/BulkExecutor.java b/src/main/java/de/ph87/homeautomation/bulk/BulkExecutor.java index f5ef4ce..a959a00 100644 --- a/src/main/java/de/ph87/homeautomation/bulk/BulkExecutor.java +++ b/src/main/java/de/ph87/homeautomation/bulk/BulkExecutor.java @@ -15,6 +15,10 @@ public class BulkExecutor { private final PropertyWriteService propertyWriteService; public void execute(final Bulk bulk) { + if (!bulk.isEnabled()) { + log.info("Bulk disabled, not executing it: {}", bulk); + return; + } log.info("Executing Bulk: {}", bulk); bulk.getEntries().forEach(entry -> propertyWriteService.writeToChannel(entry.getProperty(), entry.getValue())); log.debug("Finished executing Bulk: {}", bulk);