Skip to content

Commit

Permalink
fix: increase timeout for product search requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ainunns committed Dec 12, 2024
1 parent dea390f commit b7efa37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function index(Request $request)
$user = Auth::user();

if ($query) {
$response = Http::post('https://ecommerce-search-engine.onrender.com/search', [
$response = Http::timeout(6000)->post('https://ecommerce-search-engine.onrender.com/search', [
'query' => $query,
'records' => $product->toArray(),
'confidence' => 0.3
Expand Down Expand Up @@ -134,7 +134,7 @@ public function show(string $id)

$allProducts = Product::with('category')->get();

$response = Http::post('https://ecommerce-search-engine.onrender.com/search', [
$response = Http::timeout(6000)->post('https://ecommerce-search-engine.onrender.com/search', [
'query' => $product->name,
'records' => $allProducts->toArray(),
'confidence' => 0.3,
Expand Down

0 comments on commit b7efa37

Please sign in to comment.