refactor: implement worker pool pattern, add persistent task queue, and decouple target loading logic
This commit is contained in:
@@ -50,7 +50,7 @@ func (c *GenericCrawler) FetchJobDetail(ctx context.Context, applyURL string) (*
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("HTTP request failed: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("HTTP status error %d for URL %s", resp.StatusCode, applyURL)
|
||||
|
||||
Reference in New Issue
Block a user