swarm-stt: reply deadline agrees with the limits, one request per agent, short errors to the sender
This commit is contained in:
parent
ee10acb154
commit
f5e7caa2eb
1 changed files with 194 additions and 65 deletions
|
|
@ -52,8 +52,14 @@ nowhere but the inbox of its own client, so replies leave through NATS reply
|
|||
rights.
|
||||
|
||||
The service holds at most `MAX_WAITING` requests at once, whether running or
|
||||
waiting for the engine's one slot, because each holds its audio in memory. It
|
||||
answers a request past that with a `failed` response saying it's busy. It
|
||||
waiting for the engine's one slot, because each holds its audio in memory, and
|
||||
at most one per asking agent (the last token of the subject), so one agent
|
||||
can't fill every slot. It answers a request past either limit with a `failed`
|
||||
response saying so. `MAX_WAITING` times `RUN_TIMEOUT_SECS` must stay under the
|
||||
15-minute reply deadline, because a request at the back of the line waits for
|
||||
every run ahead of it; the daemon refuses to start with settings that break
|
||||
that. A `failed` message tells the sender briefly what went wrong; the tools'
|
||||
own output and the host's error text go to the log only. It
|
||||
removes expired transcripts every hour.
|
||||
|
||||
## Settings
|
||||
|
|
@ -68,8 +74,8 @@ set them.
|
|||
| `CACHE_TTL_SECS` | one day | how long a transcript stays |
|
||||
| `MAX_BYTES` | 6 MiB | the largest audio file taken; the queue carries 8 MiB |
|
||||
| `MAX_AUDIO_SECS` | 300 | seconds of audio decoded; ffmpeg drops the rest |
|
||||
| `RUN_TIMEOUT_SECS` | 300 | the longest one run may take |
|
||||
| `MAX_WAITING` | 8 | requests held at once |
|
||||
| `RUN_TIMEOUT_SECS` | 240 | the longest one run may take |
|
||||
| `MAX_WAITING` | 3 | requests held at once |
|
||||
| `NATS_URL`, `OIDC_TOKEN_ENDPOINT`, `OIDC_CLIENT_ID`, `OIDC_CA_FILE` | required, the CA file optional | the queue connection |
|
||||
|
||||
Two things the daemon doesn't do yet: sweep scratch directories a crash left
|
||||
|
|
|
|||
Loading…
Reference in a new issue