MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / _fetch_batch_jobs_impl

Function _fetch_batch_jobs_impl

codeclash/viewer/app.py:1401–1406  ·  view source on GitHub ↗

Internal implementation of batch jobs fetching with timeout

(hours_back: int)

Source from the content-addressed store, hash-verified

1399
1400@timeout(120)
1401def _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")

Callers 1

computeFunction · 0.85

Calls 3

get_formatted_jobsMethod · 0.95
AWSBatchMonitorClass · 0.90

Tested by

no test coverage detected