Skip to content

Commit b7a5486

Browse files
emilwojtaszekclaude
andcommitted
fix: increase classifier timeouts to handle sidecar cold starts
Receive timeout 15s → 25s, task yield 20s → 30s. The classifier sidecar accepts TCP connections before models finish loading, causing timeouts on cold starts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ccad3cd commit b7a5486

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ksef_hub/invoice_classifier.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ defmodule KsefHub.InvoiceClassifier do
6767

6868
[cat_result, tag_result] =
6969
[cat_task, tag_task]
70-
|> Task.yield_many(:timer.seconds(20))
70+
|> Task.yield_many(:timer.seconds(30))
7171
|> Enum.map(fn
7272
{_task, {:ok, result}} ->
7373
result

lib/ksef_hub/invoice_classifier/client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defmodule KsefHub.InvoiceClassifier.Client do
1313

1414
require Logger
1515

16-
@receive_timeout 15_000
16+
@receive_timeout 25_000
1717

1818
@doc "Predicts a category for the given invoice input."
1919
@spec predict_category(map(), map()) :: {:ok, map()} | {:error, term()}

0 commit comments

Comments
 (0)