apify-client-python
apify-client-python copied to clipboard
No Endpoint for RunsClient.abort()
I am trying to run an actor for multiple times. the problem is that I don't want the scrapper to run more than 60 seconds. if running abort the run and return dataset.
apify_client = ApifyClient(client_id)
task = apify_client.task(task_id)
start = time.time()
task.call(wait_secs = 30)
end = time.time()
print(f"Run finished in : {end - start}")
last_run = task.last_run(status='RUNNING' , origin = 'API')
aborted_info = last_run.abort()
The error message says there is no end-point for abort.
apify_client._errors.ApifyApiError: We have bad news: there is no API endpoint at this URL. Did you specify it correctly?