mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-11 05:41:52 +01:00
we don't know if the rule has been deleted async. (#877)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
This commit is contained in:
parent
be40b7a1e8
commit
f1dfb553c7
@ -989,12 +989,14 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
|
||||
|
||||
setTriggerOutputs(ruleUID, td);
|
||||
final WrappedRule rule = managedRules.get(ruleUID);
|
||||
boolean isSatisfied = calculateConditions(rule);
|
||||
if (isSatisfied) {
|
||||
executeActions(rule, true);
|
||||
logger.debug("The rule '{}' is executed.", ruleUID);
|
||||
} else {
|
||||
logger.debug("The rule '{}' is NOT executed, since it has unsatisfied conditions.", ruleUID);
|
||||
if (rule != null) {
|
||||
boolean isSatisfied = calculateConditions(rule);
|
||||
if (isSatisfied) {
|
||||
executeActions(rule, true);
|
||||
logger.debug("The rule '{}' is executed.", ruleUID);
|
||||
} else {
|
||||
logger.debug("The rule '{}' is NOT executed, since it has unsatisfied conditions.", ruleUID);
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.error("Failed to execute rule '{}': {}", ruleUID, t.getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user