Internal implementation of batch jobs fetching with timeout
(hours_back: int)
| 1399 | |
| 1400 | @timeout(120) |
| 1401 | def _fetch_batch_jobs_impl(hours_back: int): |
| 1402 | """Internal implementation of batch jobs fetching with timeout""" |
| 1403 | monitor = AWSBatchMonitor(job_queue="codeclash-queue", region="us-east-1", logs_base_dir=LOG_BASE_DIR) |
| 1404 | jobs = monitor.get_formatted_jobs(hours_back=hours_back) |
| 1405 | total_cpus = monitor.get_total_cpus_running() |
| 1406 | return {"jobs": jobs, "total_cpus_running": total_cpus} |
| 1407 | |
| 1408 | |
| 1409 | @app.route("/batch/api/jobs") |
no test coverage detected