| 376 | } |
| 377 | |
| 378 | bool Macro::ShouldRunActions() const |
| 379 | { |
| 380 | if (CheckInParallel() && _conditionCheckFuture.valid()) { |
| 381 | vblog(LOG_INFO, |
| 382 | "%s not ready to perform actions as condition check is still running", |
| 383 | _name.c_str()); |
| 384 | return false; |
| 385 | } |
| 386 | |
| 387 | const bool hasActionsToExecute = |
| 388 | !_paused && (_matched || _elseActions.size() > 0) && |
| 389 | _actionModeMatch; |
| 390 | |
| 391 | if (VerboseLoggingEnabled() && !_actionModeMatch && !_paused) { |
| 392 | if (_matched && _actions.size() > 0) { |
| 393 | blog(LOG_INFO, "skip actions for Macro %s (on change)", |
| 394 | _name.c_str()); |
| 395 | } |
| 396 | if (!_matched && _elseActions.size() > 0) { |
| 397 | blog(LOG_INFO, |
| 398 | "skip else actions for Macro %s (on change)", |
| 399 | _name.c_str()); |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | return hasActionsToExecute; |
| 404 | } |
| 405 | |
| 406 | void Macro::SetName(const std::string &name) |
| 407 | { |
no test coverage detected