refactor: implement worker pool pattern, add persistent task queue, and decouple target loading logic

This commit is contained in:
2026-08-12 23:28:31 -07:00
parent 51b9468737
commit 890469fed8
18 changed files with 694 additions and 442 deletions
+3 -3
View File
@@ -63,9 +63,9 @@ Respond STRICTLY with valid JSON matching the format:
resp, err := g.client.Do(req)
if err != nil {
return nil, fmt.Errorf("Gemini API call failed: %w", err)
return nil, fmt.Errorf("gemini api call failed: %w", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
respBytes, err := io.ReadAll(resp.Body)
if err != nil {
@@ -73,7 +73,7 @@ Respond STRICTLY with valid JSON matching the format:
}
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("Gemini API error (status %d): %s", resp.StatusCode, string(respBytes))
return nil, fmt.Errorf("gemini api error (status %d): %s", resp.StatusCode, string(respBytes))
}
var geminiResp struct {