#Javascript API SDK: How to call multiple actors simultaneously?

1 messages · Page 1 of 1 (latest)

jagged vessel
#

I have this code which works fine to call my custom actor a single time:
const run = await client.actor("xyz").call(input);

But I want to run multiple Actors simultaneously, like this:

        const run = await client.actor("xyz").call(input);
    }```

But obviously this doesn't work because each actor has to finish before the code initiates another actor. How do i do a synchronous call like this so I can trigger multiple actors? My data is all collected via webhook when the actor finishes, so I don't need wait for the run to finish in this codebase.
hallow warren
#

You can set it to 0, if the number of calls is not that high (you can reach api call limits per sec).
Otherwise set 2-3 secs. Should be good.