standard-azureS
Apify & Crawlee3y ago
2 replies
standard-azure

working with requestQueue/ catching apify Errors when using Apify API Client for Javascript

Hey everyone. I'm trying to run multiple actor calls simultaneously, and that works fine, unless I go over the allotted memory (32GB). I would like to use a requestQueue, which I assume would run calls in order whenever there is available memory? But I have a hard time understanding how to add actors to the queue with the API.
e.g. client.requestQueue("...").addRequest() accepts some unclear parameters that don't seem to contain an actor or the data to pass to the actor. This very much might be because I'm a javascript noob that has a bit of a hard time understanding the documentation XD

If I completely misunderstood the idea of a requestQueue, I would like to create my own. For that, I would like to be able to try/catch a normal client.actor(...).call() but specify the error, except I can't seem to find a way to specify the specific error you would get when requesting the use of too much memory (e.g. some error object to import from apify and use).

sorry for the noob questions XD
Was this page helpful?