riok / Kreya

Kreya is a GUI client for gRPC and REST APIs with innovative features for environments, authorizations and more.

Home Page:https://kreya.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow postponing execution of operations

mfridrikhson opened this issue · comments

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++) {}
}

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.

Kreya 1.14 has been released