-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
If the run is gracefully aborted during a call to client.actor(...).start(...)
, the orchestrator crashes with
file:///usr/src/app/node_modules/apify-orchestrator/dist/clients/actor-client.js:103
throw new Error(`Error starting Run: ${runName} (${this.id}).`);
^
Error: Error starting Run: run-name (scraper/name).
at ExtActorClient.enqueueAndWaitForStart (file:///usr/src/app/node_modules/apify-orchestrator/dist/clients/actor-client.js:103:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
after investigating I found no extra runs started or anything, and everything worked correctly after resurrection. I think how scary the error message looks is unfortunate, but I'm also uncertain if it can behave wrongly in cases where multiple start
calls are done concurrently (e.g.
const [run1, run2] = Promise.all([
actor.start('name1', ...),
actor.start('name2', ...),
]);
or equivalent). If special care should be taken around actor.start
(e.g. using Promise.allSettled
or wrapping calls in try
blocks) to ensure correct behavior I think it should at least be documented on the method 😌 .
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request