riok / Kreya

Kreya is a GUI client for gRPC and REST APIs with innovative features for environments, authorizations and more.
https://kreya.app
279 stars 5 forks source link

Allow postponing execution of operations #220

Closed mfridrikhson closed 2 months ago

mfridrikhson commented 2 months ago

Is your feature request related to a problem? Please describe. When running operations in scope of a collection sometimes we need to wait before executing next operations in the list to let the server process the request and/or to wait for the downstream services to exchange the data. Currently there is no easy way to achieve this neither with JS nor with some kind of operation parameter.

Describe the solution you'd like Add a parameter inside the operation settings or expose JS API (setTimeout or a wrapper around it that will enable delaying further processing) to enable this.

Describe alternatives you've considered Currently we are using this piece of code at the bottom of onCallCompleted() as a workaround :/

function sleep() {
    for (let i = 0; i < 1_000_000_000; i++) {}
}
ni507 commented 2 months ago

Hello and thank you for your report.

We've already implemented this, but it's not yet released on a stable version. You can use kreya.sleep() on the latest beta version 1.14.0-beta.3.

CommonGuy commented 2 months ago

Kreya 1.14 has been released