Current state with latest updates
This commit is contained in:
@@ -58,10 +58,12 @@ final class AiArtworkVectorSearchService
|
||||
*/
|
||||
private function downloadArtworkImage(Artwork $artwork, string $url): ?array
|
||||
{
|
||||
// Runs synchronously in the web request path — keep the budget tight
|
||||
// so a slow origin can't pin an FPM worker for 20s+.
|
||||
$response = Http::accept('*/*')
|
||||
->connectTimeout(5)
|
||||
->timeout(20)
|
||||
->retry(1, 200, throw: false)
|
||||
->connectTimeout(2)
|
||||
->timeout(6)
|
||||
->retry(0)
|
||||
->get($url);
|
||||
|
||||
if (! $response->ok()) {
|
||||
@@ -91,6 +93,10 @@ final class AiArtworkVectorSearchService
|
||||
return [];
|
||||
}
|
||||
|
||||
if ($this->client->circuitOpen()) {
|
||||
throw new RuntimeException('Vector gateway temporarily unavailable (circuit open after a recent failure).');
|
||||
}
|
||||
|
||||
$fileFailure = null;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user