Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Evaluate if the process worked? #1

Open
ff6347 opened this issue Aug 5, 2020 · 6 comments
Open

Evaluate if the process worked? #1

ff6347 opened this issue Aug 5, 2020 · 6 comments
Assignees

Comments

@ff6347
Copy link
Contributor

ff6347 commented Aug 5, 2020

From the docs I see that plug.setPowerState() returns a Promise <true> would be good not only to assume the plug is on, but to use the response. ;)

plug.setPowerState(true);

@ff6347 ff6347 changed the title Evaluate if the process wroked? Evaluate if the process worked? Aug 5, 2020
@jvolker
Copy link
Contributor

jvolker commented Aug 10, 2020

Mhhh … use it in what way? To keep track of the plugs state is something I put on the todo list for later. I don't really see a use-case at the moment. Normally if you make changes to the setup you would probably restart the server anyway.

I think this should be solid enough for now.

@ff6347
Copy link
Contributor Author

ff6347 commented Aug 13, 2020

No. I mean the plug could return false and you wouldn't notice. Just normal error handling

@jvolker
Copy link
Contributor

jvolker commented Aug 13, 2020

What would you recommend in such a case? Throw an error in the UI?

@ff6347
Copy link
Contributor Author

ff6347 commented Aug 13, 2020

Yes. Since no one will watch the shell.

@jvolker
Copy link
Contributor

jvolker commented Aug 13, 2020

But they should watch the exhibition. If something is not working they are going to complain anyway. ;)

@ff6347
Copy link
Contributor Author

ff6347 commented Aug 13, 2020

But an error handler that tells you on screen "hey. exhibit foo could not start the power" is a nice feature. If this would be there the user knows that the plug didn't or did work.

IMO it helps troubleshooting the process.

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

No branches or pull requests

2 participants