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 Blocking #194

Open
Smithx10 opened this issue Sep 14, 2020 · 2 comments
Open

Add Blocking #194

Smithx10 opened this issue Sep 14, 2020 · 2 comments

Comments

@Smithx10
Copy link
Contributor

I find myself writing the following often. I'm curious if there would be way to block until the desired action is complete similar to the -w option in node-triton. Or if CloudAPI could be enhanced to track this better?

-w, --wait  Wait for the creation to complete. Use multiple times for a
                spinner.
err = c.waitForInstState(cmpt, instUUID, "running", 60)
@twhiteman
Copy link
Contributor

This is something that has annoyed me for a while - a job/wait style of API (or maybe exposing workflow jobs through CloudAPI) would be good. E.g.
https://smartos.org/bugview/TRITON-2076

Note that the node-triton waits are generally looking for changes on one specific property (e.g. vm.state changing).

@Smithx10
Copy link
Contributor Author

@twhiteman I was thinking one way to solve this is to expose the internal change feed events for certain things over a websocket for only that account. The following branch has some rough work to make this happen we could than use that in triton-go to block etc. TritonDataCenter/sdc-cloudapi@master...Smithx10:changefeed

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

No branches or pull requests

2 participants