This batch must stop on the first failure and run at most ten jobs at once. Find the two design bugs.
Python
import asyncio
async def run_jobs(jobs):
tasks = [asyncio.create_task(job()) for job in jobs]
return await asyncio.gather(*tasks, return_exceptions=True)