MCPcopy Create free account
hub / github.com/Picrew/awesome-agent-harness / worker

Function worker

scripts/sync_github_metadata.py:134–142  ·  view source on GitHub ↗
(job: tuple[int, str, str])

Source from the content-addressed store, hash-verified

132 print(f"GitHub entries to sync: {len(github_jobs)}")
133
134 def worker(job: tuple[int, str, str]) -> tuple[int, dict[str, Any] | None, str | None]:
135 idx, owner, repo = job
136 try:
137 payload = fetch_repo_with_retry(owner, repo, token)
138 return idx, payload, None
139 except urllib.error.HTTPError as e:
140 return idx, None, f"{owner}/{repo}: HTTP {e.code}"
141 except Exception as e: # pragma: no cover
142 return idx, None, f"{owner}/{repo}: {e}"
143
144 done = 0
145 with ThreadPoolExecutor(max_workers=12) as pool:

Callers

nothing calls this directly

Calls 1

fetch_repo_with_retryFunction · 0.85

Tested by

no test coverage detected