Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to run rules using scheduler to avoid "Failed to execute rule ‘{}' with status '{}'" error path #4074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OlegAndreych
Copy link

I propose to use org.openhab.core.automation.internal.TriggerHandlerCallbackImpl#getScheduler when calling scripts to resolve an issue with simultaneous executions, as it is done for "normal" rules execution path.

That's needed for a code reuse using UI scripts.
Many rules are triggered with events with no known intervals and/or timing, so there's no sensible way to spread executions of these rules, so that they don't call scripts simultaneously.

An example of an issue can be found there: https://community.openhab.org/t/simultaneous-calling-of-script-problem/140087.

…{}' with status '{}'" error path (openhab#4072)

Signed-off-by: Oleg Andreych <[email protected]>
@rkoshak
Copy link

rkoshak commented Jan 29, 2024

This might amount to a breaking change, though it breaks in a way that may not impact anyone.

Right now when one rule calls another, the calling rule blocks until the called rule returns. If I understand this PR correctly, that won't be the case any longer. The call to run the other rule will immediately return instead of blocking, which could break end users's rules if they are depending on this blocking behavior.

@OlegAndreych
Copy link
Author

OlegAndreych commented Feb 14, 2024

Note: we've discussed previous comment in the issue #4072.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants