-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Make ExecUtil more robust #1700
Conversation
Signed-off-by: Connor Petty <[email protected]>
I also never like the usage of The There are also several add-ons that need to be updated for this as well as documentation. I think it would also be better when the command and parameters always follow each other. That means when specifying a timeout it should be specified as first parameter instead of being in between the command and parameters. |
Being a big fan of java.time I think it would also be more clear to specify the timeout using a |
Signed-off-by: Connor Petty <[email protected]>
Signed-off-by: Connor Petty <[email protected]>
I've gone ahead and made the recommended changes, the only reason I didn't do it the first time is because I didn't want to break existing code. But if you are ok breaking some code then I'd be more than happy to. From a quick search it looks like only 4 addons are using the ExecUtil right now so fixing those will be very easy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Can you also create PR for the add-ons so we can limit the time builds are broken?
bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/exec/ExecUtil.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/exec/ExecUtil.java
Outdated
Show resolved
Hide resolved
Me either, but as an excuse, it was selected to be exec1 binding syntax compatible ;) |
Signed-off-by: Connor Petty <[email protected]>
|
bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/exec/ExecUtil.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Connor Petty <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-3-0-milestone-2-discussion/107564/97 |
…re#1700 Signed-off-by: Jerome Luckenbach <[email protected]>
* Exec actions timeout is now in seconds. Reference: openhab/openhab-core#1700 Signed-off-by: Jerome Luckenbach <[email protected]> * Details on how to use Duration now. Signed-off-by: Jerome Luckenbach <[email protected]>
Signed-off-by: Connor Petty <[email protected]> GitOrigin-RevId: 0dfda1e
Ever since I first read this code I've been waiting for an excuse to rewrite it.
I went ahead and got rid of the
@@
delimiter usage since it seems silly to not just take the arguments as an additional parameter.Fixes #1677
Signed-off-by: Connor Petty [email protected]