diff --git a/run-skynet-requests.py b/run-skynet-requests.py index 5e75505..a4e1175 100644 --- a/run-skynet-requests.py +++ b/run-skynet-requests.py @@ -74,16 +74,22 @@ async def get(job_id): await asyncio.sleep(1) success = True + total_duration = 0 # get the results of the jobs for job_id in ids: response = await get(job_id) status = response['status'] - print(f'Job {job_id} status: {status}\n') + duration = response['duration'] + total_duration += duration + + print(f'Job {job_id} status: {status} duration: {duration} \n') if status != 'success': success = False + print(f'Total duration: {total_duration}') + await session.close() exit(1 if not success else 0)