Closed knyghtryda closed 6 months ago
Hi @knyghtryda,
I was not able to replicate the issue. I tried it with my own task and the following code executing 10 task runs at once:
import asyncio
from apify_client import ApifyClientAsync
TOKEN = 'my_token'
TASK_ID = 'my_task_id'
async def main() -> None:
apify_client = ApifyClientAsync(TOKEN)
task_client = apify_client.task(TASK_ID)
for i in range(10):
task_run = await task_client.start()
print(f'Run {i}: {task_run}')
if __name__ == '__main__':
asyncio.run(main())
and everything works fine for me.
So, could you please provide a full replicable code sample?
Closing, if it is still a problem, please let us know and give us more details.
I am trying to parallelize a scraping task by breaking up long jobs into smaller chunks and running multiple tasks simultaneously. Doing this manually through the Apify UI works fine. However, when I to automate it via a python sdk call I'm getting an error. I am currently using
ApifyClientAsync
to parallelize everything. This is able to kick off up to 6 jobs before it errors out.