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

add delayed execution, remove unused JRuleOr #122

Merged
merged 2 commits into from Feb 12, 2023

Conversation

querdenker2k
Copy link
Collaborator

  • add JRuleDelayed annotation to execute a triggered method delayed
    UseCase: Do something when twilight is below 10lux + X minutes
  • added Unit test and IT Test for this
  • remove unused JRuleOr

@querdenker2k
Copy link
Collaborator Author

PUSH

@seime
Copy link
Collaborator

seime commented Feb 12, 2023

@querdenker2k must rebase/fix conflicts

# Conflicts:
#	src/main/java/org/openhab/automation/jrule/internal/engine/JRuleEngine.java
#	src/main/java/org/openhab/automation/jrule/internal/engine/excutioncontext/JRuleItemExecutionContext.java
#	src/main/java/org/openhab/automation/jrule/internal/engine/excutioncontext/JRuleItemReceivedCommandExecutionContext.java
#	src/main/java/org/openhab/automation/jrule/internal/engine/excutioncontext/JRuleItemReceivedUpdateExecutionContext.java
#	src/test/java/org/openhab/automation/jrule/rules/user/TestRules.java
@querdenker2k
Copy link
Collaborator Author

conflicts resolved

@seime
Copy link
Collaborator

seime commented Feb 12, 2023

The build failed once on my side. Not sure whether it is due to this PR or something introduced earlier: (infortunately I did not capture any stacktrace)

[INFO]
[ERROR] Failures:
[ERROR]   JRuleTimerTest.testRepeatingTimer:72 expected: <true> but was: <false>
[INFO]
[ERROR] Tests run: 228, Failures: 1, Errors: 0, Skipped: 26

I have a feeling something is wrong with the repeating timer. I have a few cases where cancellation of a repeating timer seem to fail (inconsistently), and the timer executes it's configured number of repeates. That might be related to failure of this testcase (intermittently)

Do you have any insight @querdenker2k ? If it is unrelated to this PR, feel free to create a new issue instead.

@querdenker2k
Copy link
Collaborator Author

i use repeating times in two rules and it seems that they work

@seime seime merged commit d136c45 into seaside1:main Feb 12, 2023
@querdenker2k querdenker2k deleted the delayed_execution branch February 12, 2023 17:03
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.

None yet

2 participants