Actor picture

Abort Actor Runs

mnmkng/abort-actor-runs

This actor enables aborting of all user's currently running actors with a single click or by a single API call. It will scan all actors of the user and up to 1000 of their latest runs and will abort all RUNNING and READY actors. It may also be called with an "actorIds" parameter, which is an Array listing only specific actor ids for which the runs should be aborted. By default it's set to run with 128MBs of memory to minimize compute unit usage at the expense of speed. If you need it to run faster, increase the memory limit. It also scans the user's actors sequentially to prevent API abuse. If you need even more speed, modify the source code to run concurrently, but make sure not to hit the API rate limits.

You need to have an Apify account with an API token.

  1. To run the actor from your program externally, copy-paste the code below into your program (based on programming language)

  2. Replace <YOUR_API_TOKEN> with your own token (you can find it here)

1
2
3
4
5
6
7
8
const Apify = require('Apify');

Apify.client.setOptions({ token: '<YOUR_API_TOKEN>' });

const run = await Apify.call('mnmkng/abort-actor-runs', { });

console.log('Actor finished, here is the output:');
console.dir(run.output);
  • Modified
  • Last run
  • Used77 times
  • Used by6 users
Categories