#template pipeline execution

9 messages · Page 1 of 1 (latest)

humble lily
#

Hi ,

I have one doubt if I am writing one custom action template and in that I am writing a function which will run for 30 sec will my action will also run for 30 sec or it will move to next action

humble lily
humble lily
#

template pipeline execution

chrome geode
#

@humble lily you need to make sure that the action handler uses await to block the completion of the promise.

#

Using something like await fetchData might help you, or look at some polling patterns using async/await

humble lily
#

Ok @chrome geode thanks let me try

chrome geode
#

You might have to restructure the code a little bit, and use await for the recursion, but the action will wait providing you use async/await

humble lily
#

I have write this code but its throwing this error

Error fetching JSON data: SyntaxError: Unexpected token < in JSON at position 16
[1] at JSON.parse (<anonymous>)
[1] at Response.json (node:internal/deps/undici/undici:6160:23)

I logged my response and its throwing
[1] 'content-type' => 'application/json;charset=utf-8',