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

Support return commands from previous decision to save overhead of calling waitUntil #299

Open
longquanzheng opened this issue Jul 6, 2023 · 3 comments
Labels

Comments

@longquanzheng
Copy link
Contributor

A lot of the waitUntil api is quite simple —- just return a static command request. For those cases, it’s more efficient to return them from the previous state decision

@longquanzheng
Copy link
Contributor Author

longquanzheng commented Jul 6, 2023

One idea is to let the state decision to call the next state ‘a waitUntil api in advance (it even has the input already).

And then provide a flag in workflow state option to opt in this optimization.

We may provide an IDE plugin to hint user to use this feature— based on the implementation of waitUntil

@longquanzheng longquanzheng changed the title Support Shortcut to return commands from previous decision to save overhead of calling an API Support Shortcut to return commands from previous decision to save overhead of calling waitUntil API Jul 6, 2023
@longquanzheng longquanzheng changed the title Support Shortcut to return commands from previous decision to save overhead of calling waitUntil API Support return commands from previous decision to save overhead of calling waitUn Jul 6, 2023
@longquanzheng longquanzheng changed the title Support return commands from previous decision to save overhead of calling waitUn Support return commands from previous decision to save overhead of calling waitUntil Jul 7, 2023
@longquanzheng
Copy link
Contributor Author

longquanzheng commented Jul 8, 2023

WaitUntilEagerly , not persistence or communication. User code shouldn’t call external api

@longquanzheng
Copy link
Contributor Author

The implementation will be similar to

if len(commandReq.GetInterStateChannelCommands()) > 0 {

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

No branches or pull requests

1 participant