mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-04 18:06:48 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa3cf5da0f | |||
| 8707c6694a | |||
| 4acde4b7fd | |||
| a2ed7d60d5 | |||
| a08f94a5bf | |||
|
|
c05d1f03cd | ||
|
|
23eb1371cb |
17
CHANGELOG.md
17
CHANGELOG.md
@@ -1,5 +1,22 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.32.2](https://github.com/Monadical-SAS/reflector/compare/v0.32.1...v0.32.2) (2026-02-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* increase TIMEOUT_MEDIUM from 2m to 5m for LLM tasks ([#843](https://github.com/Monadical-SAS/reflector/issues/843)) ([4acde4b](https://github.com/Monadical-SAS/reflector/commit/4acde4b7fdef88cc02ca12cf38c9020b05ed96ac))
|
||||||
|
* make caddy optional ([#841](https://github.com/Monadical-SAS/reflector/issues/841)) ([a2ed7d6](https://github.com/Monadical-SAS/reflector/commit/a2ed7d60d557b551a5b64e4dfd909b63a791d9fc))
|
||||||
|
* use Daily API recording.duration as master source for transcript duration ([#844](https://github.com/Monadical-SAS/reflector/issues/844)) ([8707c66](https://github.com/Monadical-SAS/reflector/commit/8707c6694a80c939b6214bbc13331741f192e082))
|
||||||
|
|
||||||
|
## [0.32.1](https://github.com/Monadical-SAS/reflector/compare/v0.32.0...v0.32.1) (2026-01-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* daily multitrack pipeline finalze dependency fix ([23eb137](https://github.com/Monadical-SAS/reflector/commit/23eb1371cb9348c4b81eb12ad506b582f8a4799e))
|
||||||
|
* match httpx pad with hatchet audio timeout ([c05d1f0](https://github.com/Monadical-SAS/reflector/commit/c05d1f03cd8369fc06efd455527e50246887efd0))
|
||||||
|
|
||||||
## [0.32.0](https://github.com/Monadical-SAS/reflector/compare/v0.31.0...v0.32.0) (2026-01-30)
|
## [0.32.0](https://github.com/Monadical-SAS/reflector/compare/v0.31.0...v0.32.0) (2026-01-30)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# Reflector Caddyfile
|
# Reflector Caddyfile (optional reverse proxy)
|
||||||
# Replace example.com with your actual domains
|
# Use this only when you run Caddy via: docker compose -f docker-compose.prod.yml --profile caddy up -d
|
||||||
# CORS is handled by the backend - Caddy just proxies
|
# If Coolify, Traefik, or nginx already use ports 80/443, do NOT start Caddy; point your proxy at web:3000 and server:1250.
|
||||||
|
#
|
||||||
|
# Replace example.com with your actual domains. CORS is handled by the backend - Caddy just proxies.
|
||||||
#
|
#
|
||||||
# For environment variable substitution, set:
|
# For environment variable substitution, set:
|
||||||
# FRONTEND_DOMAIN=app.example.com
|
# FRONTEND_DOMAIN=app.example.com
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
# Production Docker Compose configuration
|
# Production Docker Compose configuration
|
||||||
# Usage: docker compose -f docker-compose.prod.yml up -d
|
# Usage: docker compose -f docker-compose.prod.yml up -d
|
||||||
#
|
#
|
||||||
|
# Caddy (reverse proxy on ports 80/443) is OPTIONAL and behind the "caddy" profile:
|
||||||
|
# - With Caddy (self-hosted, you manage SSL): docker compose -f docker-compose.prod.yml --profile caddy up -d
|
||||||
|
# - Without Caddy (Coolify/Traefik/nginx already on 80/443): docker compose -f docker-compose.prod.yml up -d
|
||||||
|
# Then point your proxy at web:3000 (frontend) and server:1250 (API).
|
||||||
|
#
|
||||||
# Prerequisites:
|
# Prerequisites:
|
||||||
# 1. Copy .env.example to .env and configure for both server/ and www/
|
# 1. Copy .env.example to .env and configure for both server/ and www/
|
||||||
# 2. Copy Caddyfile.example to Caddyfile and edit with your domains
|
# 2. If using Caddy: copy Caddyfile.example to Caddyfile and edit your domains
|
||||||
# 3. Deploy Modal GPU functions (see gpu/modal_deployments/deploy-all.sh)
|
# 3. Deploy Modal GPU functions (see gpu/modal_deployments/deploy-all.sh)
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@@ -84,6 +89,8 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
|
profiles:
|
||||||
|
- caddy
|
||||||
image: caddy:2-alpine
|
image: caddy:2-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ This page documents the Docker Compose configuration for Reflector. For the comp
|
|||||||
The `docker-compose.prod.yml` includes these services:
|
The `docker-compose.prod.yml` includes these services:
|
||||||
|
|
||||||
| Service | Image | Purpose |
|
| Service | Image | Purpose |
|
||||||
|---------|-------|---------|
|
| ---------- | --------------------------------- | --------------------------------------------------------------------------- |
|
||||||
| `web` | `monadicalsas/reflector-frontend` | Next.js frontend |
|
| `web` | `monadicalsas/reflector-frontend` | Next.js frontend |
|
||||||
| `server` | `monadicalsas/reflector-backend` | FastAPI backend |
|
| `server` | `monadicalsas/reflector-backend` | FastAPI backend |
|
||||||
| `worker` | `monadicalsas/reflector-backend` | Celery worker for background tasks |
|
| `worker` | `monadicalsas/reflector-backend` | Celery worker for background tasks |
|
||||||
| `beat` | `monadicalsas/reflector-backend` | Celery beat scheduler |
|
| `beat` | `monadicalsas/reflector-backend` | Celery beat scheduler |
|
||||||
| `redis` | `redis:7.2-alpine` | Message broker and cache |
|
| `redis` | `redis:7.2-alpine` | Message broker and cache |
|
||||||
| `postgres` | `postgres:17-alpine` | Primary database |
|
| `postgres` | `postgres:17-alpine` | Primary database |
|
||||||
| `caddy` | `caddy:2-alpine` | Reverse proxy with auto-SSL |
|
| `caddy` | `caddy:2-alpine` | Reverse proxy with auto-SSL (optional; see [Caddy profile](#caddy-profile)) |
|
||||||
|
|
||||||
## Environment Files
|
## Environment Files
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@ Reflector uses two separate environment files:
|
|||||||
Used by: `server`, `worker`, `beat`
|
Used by: `server`, `worker`, `beat`
|
||||||
|
|
||||||
Key variables:
|
Key variables:
|
||||||
|
|
||||||
```env
|
```env
|
||||||
# Database connection
|
# Database connection
|
||||||
DATABASE_URL=postgresql+asyncpg://reflector:reflector@postgres:5432/reflector
|
DATABASE_URL=postgresql+asyncpg://reflector:reflector@postgres:5432/reflector
|
||||||
@@ -54,6 +55,7 @@ TRANSCRIPT_MODAL_API_KEY=...
|
|||||||
Used by: `web`
|
Used by: `web`
|
||||||
|
|
||||||
Key variables:
|
Key variables:
|
||||||
|
|
||||||
```env
|
```env
|
||||||
# Domain configuration
|
# Domain configuration
|
||||||
SITE_URL=https://app.example.com
|
SITE_URL=https://app.example.com
|
||||||
@@ -71,7 +73,7 @@ Note: `API_URL` is used client-side (browser), `SERVER_API_URL` is used server-s
|
|||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
| Volume | Purpose |
|
| Volume | Purpose |
|
||||||
|--------|---------|
|
| --------------- | ----------------------------- |
|
||||||
| `redis_data` | Redis persistence |
|
| `redis_data` | Redis persistence |
|
||||||
| `postgres_data` | PostgreSQL data |
|
| `postgres_data` | PostgreSQL data |
|
||||||
| `server_data` | Uploaded files, local storage |
|
| `server_data` | Uploaded files, local storage |
|
||||||
@@ -82,14 +84,30 @@ Note: `API_URL` is used client-side (browser), `SERVER_API_URL` is used server-s
|
|||||||
|
|
||||||
All services share the default network. The network is marked `attachable: true` to allow external containers (like Authentik) to join.
|
All services share the default network. The network is marked `attachable: true` to allow external containers (like Authentik) to join.
|
||||||
|
|
||||||
|
## Caddy profile
|
||||||
|
|
||||||
|
Caddy (ports 80 and 443) is **optional** and behind the `caddy` profile so it does not conflict with an existing reverse proxy (e.g. Coolify, Traefik, nginx).
|
||||||
|
|
||||||
|
- **With Caddy** (you want Reflector to handle SSL):
|
||||||
|
`docker compose -f docker-compose.prod.yml --profile caddy up -d`
|
||||||
|
- **Without Caddy** (Coolify or another proxy already on 80/443):
|
||||||
|
`docker compose -f docker-compose.prod.yml up -d`
|
||||||
|
Then configure your proxy to send traffic to `web:3000` (frontend) and `server:1250` (API).
|
||||||
|
|
||||||
## Common Commands
|
## Common Commands
|
||||||
|
|
||||||
### Start all services
|
### Start all services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Without Caddy (e.g. when using Coolify)
|
||||||
docker compose -f docker-compose.prod.yml up -d
|
docker compose -f docker-compose.prod.yml up -d
|
||||||
|
|
||||||
|
# With Caddy as reverse proxy
|
||||||
|
docker compose -f docker-compose.prod.yml --profile caddy up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### View logs
|
### View logs
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# All services
|
# All services
|
||||||
docker compose -f docker-compose.prod.yml logs -f
|
docker compose -f docker-compose.prod.yml logs -f
|
||||||
@@ -99,6 +117,7 @@ docker compose -f docker-compose.prod.yml logs server --tail 50
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Restart a service
|
### Restart a service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Quick restart (doesn't reload .env changes)
|
# Quick restart (doesn't reload .env changes)
|
||||||
docker compose -f docker-compose.prod.yml restart server
|
docker compose -f docker-compose.prod.yml restart server
|
||||||
@@ -108,27 +127,32 @@ docker compose -f docker-compose.prod.yml up -d server
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Run database migrations
|
### Run database migrations
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml exec server uv run alembic upgrade head
|
docker compose -f docker-compose.prod.yml exec server uv run alembic upgrade head
|
||||||
```
|
```
|
||||||
|
|
||||||
### Access database
|
### Access database
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml exec postgres psql -U reflector
|
docker compose -f docker-compose.prod.yml exec postgres psql -U reflector
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pull latest images
|
### Pull latest images
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml pull
|
docker compose -f docker-compose.prod.yml pull
|
||||||
docker compose -f docker-compose.prod.yml up -d
|
docker compose -f docker-compose.prod.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Stop all services
|
### Stop all services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml down
|
docker compose -f docker-compose.prod.yml down
|
||||||
```
|
```
|
||||||
|
|
||||||
### Full reset (WARNING: deletes data)
|
### Full reset (WARNING: deletes data)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml down -v
|
docker compose -f docker-compose.prod.yml down -v
|
||||||
```
|
```
|
||||||
@@ -187,6 +211,7 @@ The Caddyfile supports environment variable substitution:
|
|||||||
Set `FRONTEND_DOMAIN` and `API_DOMAIN` environment variables, or edit the file directly.
|
Set `FRONTEND_DOMAIN` and `API_DOMAIN` environment variables, or edit the file directly.
|
||||||
|
|
||||||
### Reload Caddy after changes
|
### Reload Caddy after changes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml exec caddy caddy reload --config /etc/caddy/Caddyfile
|
docker compose -f docker-compose.prod.yml exec caddy caddy reload --config /etc/caddy/Caddyfile
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Type: A Name: api Value: <your-server-ip>
|
|||||||
Reflector requires GPU processing for transcription and speaker diarization. Choose one option:
|
Reflector requires GPU processing for transcription and speaker diarization. Choose one option:
|
||||||
|
|
||||||
| | **Modal.com (Cloud)** | **Self-Hosted GPU** |
|
| | **Modal.com (Cloud)** | **Self-Hosted GPU** |
|
||||||
|---|---|---|
|
| ------------ | --------------------------------- | ---------------------------- |
|
||||||
| **Best for** | No GPU hardware, zero maintenance | Own GPU server, full control |
|
| **Best for** | No GPU hardware, zero maintenance | Own GPU server, full control |
|
||||||
| **Pricing** | Pay-per-use | Fixed infrastructure cost |
|
| **Pricing** | Pay-per-use | Fixed infrastructure cost |
|
||||||
|
|
||||||
@@ -70,6 +70,7 @@ Reflector requires GPU processing for transcription and speaker diarization. Cho
|
|||||||
#### Accept HuggingFace Licenses
|
#### Accept HuggingFace Licenses
|
||||||
|
|
||||||
Visit both pages and click "Accept":
|
Visit both pages and click "Accept":
|
||||||
|
|
||||||
- https://huggingface.co/pyannote/speaker-diarization-3.1
|
- https://huggingface.co/pyannote/speaker-diarization-3.1
|
||||||
- https://huggingface.co/pyannote/segmentation-3.0
|
- https://huggingface.co/pyannote/segmentation-3.0
|
||||||
|
|
||||||
@@ -179,6 +180,7 @@ Save these credentials - you'll need them in the next step.
|
|||||||
## Configure Environment
|
## Configure Environment
|
||||||
|
|
||||||
Reflector has two env files:
|
Reflector has two env files:
|
||||||
|
|
||||||
- `server/.env` - Backend configuration
|
- `server/.env` - Backend configuration
|
||||||
- `www/.env` - Frontend configuration
|
- `www/.env` - Frontend configuration
|
||||||
|
|
||||||
@@ -190,6 +192,7 @@ nano server/.env
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Required settings:**
|
**Required settings:**
|
||||||
|
|
||||||
```env
|
```env
|
||||||
# Database (defaults work with docker-compose.prod.yml)
|
# Database (defaults work with docker-compose.prod.yml)
|
||||||
DATABASE_URL=postgresql+asyncpg://reflector:reflector@postgres:5432/reflector
|
DATABASE_URL=postgresql+asyncpg://reflector:reflector@postgres:5432/reflector
|
||||||
@@ -249,6 +252,7 @@ nano www/.env
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Required settings:**
|
**Required settings:**
|
||||||
|
|
||||||
```env
|
```env
|
||||||
# Your domains
|
# Your domains
|
||||||
SITE_URL=https://app.example.com
|
SITE_URL=https://app.example.com
|
||||||
@@ -266,7 +270,11 @@ FEATURE_REQUIRE_LOGIN=false
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Configure Caddy
|
## Reverse proxy (Caddy or existing)
|
||||||
|
|
||||||
|
**If Coolify, Traefik, or nginx already use ports 80/443** (e.g. Coolify on your host): skip Caddy. Start the stack without the Caddy profile (see [Start Services](#start-services) below), then point your proxy at `web:3000` (frontend) and `server:1250` (API).
|
||||||
|
|
||||||
|
**If you want Reflector to provide the reverse proxy and SSL:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp Caddyfile.example Caddyfile
|
cp Caddyfile.example Caddyfile
|
||||||
@@ -289,10 +297,18 @@ Replace `example.com` with your domains. The `{$VAR:default}` syntax uses Caddy'
|
|||||||
|
|
||||||
## Start Services
|
## Start Services
|
||||||
|
|
||||||
|
**Without Caddy** (e.g. Coolify already on 80/443):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml up -d
|
docker compose -f docker-compose.prod.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**With Caddy** (Reflector handles SSL):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.prod.yml --profile caddy up -d
|
||||||
|
```
|
||||||
|
|
||||||
Wait for containers to start (first run may take 1-2 minutes to pull images and initialize).
|
Wait for containers to start (first run may take 1-2 minutes to pull images and initialize).
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -300,18 +316,21 @@ Wait for containers to start (first run may take 1-2 minutes to pull images and
|
|||||||
## Verify Deployment
|
## Verify Deployment
|
||||||
|
|
||||||
### Check services
|
### Check services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml ps
|
docker compose -f docker-compose.prod.yml ps
|
||||||
# All should show "Up"
|
# All should show "Up"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test API
|
### Test API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://api.example.com/health
|
curl https://api.example.com/health
|
||||||
# Should return: {"status":"healthy"}
|
# Should return: {"status":"healthy"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test Frontend
|
### Test Frontend
|
||||||
|
|
||||||
- Visit https://app.example.com
|
- Visit https://app.example.com
|
||||||
- You should see the Reflector interface
|
- You should see the Reflector interface
|
||||||
- Try uploading an audio file to test transcription
|
- Try uploading an audio file to test transcription
|
||||||
@@ -327,6 +346,7 @@ By default, Reflector is open (no login required). **Authentication is required
|
|||||||
See [Authentication Setup](./auth-setup) for full Authentik OAuth configuration.
|
See [Authentication Setup](./auth-setup) for full Authentik OAuth configuration.
|
||||||
|
|
||||||
Quick summary:
|
Quick summary:
|
||||||
|
|
||||||
1. Deploy Authentik on your server
|
1. Deploy Authentik on your server
|
||||||
2. Create OAuth provider in Authentik
|
2. Create OAuth provider in Authentik
|
||||||
3. Extract public key for JWT verification
|
3. Extract public key for JWT verification
|
||||||
@@ -358,6 +378,7 @@ DAILYCO_STORAGE_AWS_ROLE_ARN=<arn:aws:iam::ACCOUNT:role/DailyCo>
|
|||||||
```
|
```
|
||||||
|
|
||||||
Reload env and restart:
|
Reload env and restart:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml up -d server worker
|
docker compose -f docker-compose.prod.yml up -d server worker
|
||||||
```
|
```
|
||||||
@@ -367,35 +388,43 @@ docker compose -f docker-compose.prod.yml up -d server worker
|
|||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Check logs for errors
|
### Check logs for errors
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml logs server --tail 20
|
docker compose -f docker-compose.prod.yml logs server --tail 20
|
||||||
docker compose -f docker-compose.prod.yml logs worker --tail 20
|
docker compose -f docker-compose.prod.yml logs worker --tail 20
|
||||||
```
|
```
|
||||||
|
|
||||||
### Services won't start
|
### Services won't start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.prod.yml logs
|
docker compose -f docker-compose.prod.yml logs
|
||||||
```
|
```
|
||||||
|
|
||||||
### CORS errors in browser
|
### CORS errors in browser
|
||||||
|
|
||||||
- Verify `CORS_ORIGIN` in `server/.env` matches your frontend domain exactly (including `https://`)
|
- Verify `CORS_ORIGIN` in `server/.env` matches your frontend domain exactly (including `https://`)
|
||||||
- Reload env: `docker compose -f docker-compose.prod.yml up -d server`
|
- Reload env: `docker compose -f docker-compose.prod.yml up -d server`
|
||||||
|
|
||||||
### SSL certificate errors
|
### SSL certificate errors (when using Caddy)
|
||||||
|
|
||||||
- Caddy auto-provisions Let's Encrypt certificates
|
- Caddy auto-provisions Let's Encrypt certificates
|
||||||
- Ensure ports 80 and 443 are open
|
- Ensure ports 80 and 443 are open and not used by another proxy
|
||||||
- Check: `docker compose -f docker-compose.prod.yml logs caddy`
|
- Check: `docker compose -f docker-compose.prod.yml logs caddy`
|
||||||
|
- If port 80 is already in use (e.g. by Coolify), run without Caddy: `docker compose -f docker-compose.prod.yml up -d` and use your existing proxy
|
||||||
|
|
||||||
### Transcription not working
|
### Transcription not working
|
||||||
|
|
||||||
- Check Modal dashboard: https://modal.com/apps
|
- Check Modal dashboard: https://modal.com/apps
|
||||||
- Verify URLs in `server/.env` match deployed functions
|
- Verify URLs in `server/.env` match deployed functions
|
||||||
- Check worker logs: `docker compose -f docker-compose.prod.yml logs worker`
|
- Check worker logs: `docker compose -f docker-compose.prod.yml logs worker`
|
||||||
|
|
||||||
### "Login required" but auth not configured
|
### "Login required" but auth not configured
|
||||||
|
|
||||||
- Set `FEATURE_REQUIRE_LOGIN=false` in `www/.env`
|
- Set `FEATURE_REQUIRE_LOGIN=false` in `www/.env`
|
||||||
- Rebuild frontend: `docker compose -f docker-compose.prod.yml up -d --force-recreate web`
|
- Rebuild frontend: `docker compose -f docker-compose.prod.yml up -d --force-recreate web`
|
||||||
|
|
||||||
### Database migrations or connectivity issues
|
### Database migrations or connectivity issues
|
||||||
|
|
||||||
Migrations run automatically on server startup. To check database connectivity or debug migration failures:
|
Migrations run automatically on server startup. To check database connectivity or debug migration failures:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -408,4 +437,3 @@ docker compose -f docker-compose.prod.yml exec server uv run python -c "from ref
|
|||||||
# Manually run migrations (if needed)
|
# Manually run migrations (if needed)
|
||||||
docker compose -f docker-compose.prod.yml exec server uv run alembic upgrade head
|
docker compose -f docker-compose.prod.yml exec server uv run alembic upgrade head
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ LLM_RATE_LIMIT_PER_SECOND = 10
|
|||||||
|
|
||||||
# Task execution timeouts (seconds)
|
# Task execution timeouts (seconds)
|
||||||
TIMEOUT_SHORT = 60 # Quick operations: API calls, DB updates
|
TIMEOUT_SHORT = 60 # Quick operations: API calls, DB updates
|
||||||
TIMEOUT_MEDIUM = 120 # Single LLM calls, waveform generation
|
TIMEOUT_MEDIUM = (
|
||||||
|
300 # Single LLM calls, waveform generation (5m for slow LLM responses)
|
||||||
|
)
|
||||||
TIMEOUT_LONG = 180 # Action items (larger context LLM)
|
TIMEOUT_LONG = 180 # Action items (larger context LLM)
|
||||||
TIMEOUT_AUDIO = 720 # Audio processing: padding, mixdown
|
TIMEOUT_AUDIO = 720 # Audio processing: padding, mixdown
|
||||||
TIMEOUT_HEAVY = 600 # Transcription, fan-out LLM tasks
|
TIMEOUT_HEAVY = 600 # Transcription, fan-out LLM tasks
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ async def get_participants(input: PipelineInput, ctx: Context) -> ParticipantsRe
|
|||||||
mtg_session_id = recording.mtg_session_id
|
mtg_session_id = recording.mtg_session_id
|
||||||
async with fresh_db_connection():
|
async with fresh_db_connection():
|
||||||
from reflector.db.transcripts import ( # noqa: PLC0415
|
from reflector.db.transcripts import ( # noqa: PLC0415
|
||||||
|
TranscriptDuration,
|
||||||
TranscriptParticipant,
|
TranscriptParticipant,
|
||||||
transcripts_controller,
|
transcripts_controller,
|
||||||
)
|
)
|
||||||
@@ -330,15 +331,26 @@ async def get_participants(input: PipelineInput, ctx: Context) -> ParticipantsRe
|
|||||||
if not transcript:
|
if not transcript:
|
||||||
raise ValueError(f"Transcript {input.transcript_id} not found")
|
raise ValueError(f"Transcript {input.transcript_id} not found")
|
||||||
# Note: title NOT cleared - preserves existing titles
|
# Note: title NOT cleared - preserves existing titles
|
||||||
|
# Duration from Daily API (seconds -> milliseconds) - master source
|
||||||
|
duration_ms = recording.duration * 1000 if recording.duration else 0
|
||||||
await transcripts_controller.update(
|
await transcripts_controller.update(
|
||||||
transcript,
|
transcript,
|
||||||
{
|
{
|
||||||
"events": [],
|
"events": [],
|
||||||
"topics": [],
|
"topics": [],
|
||||||
"participants": [],
|
"participants": [],
|
||||||
|
"duration": duration_ms,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
await append_event_and_broadcast(
|
||||||
|
input.transcript_id,
|
||||||
|
transcript,
|
||||||
|
"DURATION",
|
||||||
|
TranscriptDuration(duration=duration_ms),
|
||||||
|
logger=logger,
|
||||||
|
)
|
||||||
|
|
||||||
mtg_session_id = assert_non_none_and_non_empty(
|
mtg_session_id = assert_non_none_and_non_empty(
|
||||||
mtg_session_id, "mtg_session_id is required"
|
mtg_session_id, "mtg_session_id is required"
|
||||||
)
|
)
|
||||||
@@ -1095,7 +1107,7 @@ async def identify_action_items(
|
|||||||
|
|
||||||
|
|
||||||
@daily_multitrack_pipeline.task(
|
@daily_multitrack_pipeline.task(
|
||||||
parents=[generate_title, generate_recap, identify_action_items],
|
parents=[process_tracks, generate_title, generate_recap, identify_action_items],
|
||||||
execution_timeout=timedelta(seconds=TIMEOUT_SHORT),
|
execution_timeout=timedelta(seconds=TIMEOUT_SHORT),
|
||||||
retries=3,
|
retries=3,
|
||||||
)
|
)
|
||||||
@@ -1108,12 +1120,8 @@ async def finalize(input: PipelineInput, ctx: Context) -> FinalizeResult:
|
|||||||
"""
|
"""
|
||||||
ctx.log("finalize: saving transcript and setting status to 'ended'")
|
ctx.log("finalize: saving transcript and setting status to 'ended'")
|
||||||
|
|
||||||
mixdown_result = ctx.task_output(mixdown_tracks)
|
|
||||||
track_result = ctx.task_output(process_tracks)
|
track_result = ctx.task_output(process_tracks)
|
||||||
|
|
||||||
duration = mixdown_result.duration
|
|
||||||
all_words = track_result.all_words
|
|
||||||
|
|
||||||
# Cleanup temporary padded S3 files (deferred until finalize for semantic parity with Celery)
|
# Cleanup temporary padded S3 files (deferred until finalize for semantic parity with Celery)
|
||||||
created_padded_files = track_result.created_padded_files
|
created_padded_files = track_result.created_padded_files
|
||||||
if created_padded_files:
|
if created_padded_files:
|
||||||
@@ -1133,7 +1141,6 @@ async def finalize(input: PipelineInput, ctx: Context) -> FinalizeResult:
|
|||||||
|
|
||||||
async with fresh_db_connection():
|
async with fresh_db_connection():
|
||||||
from reflector.db.transcripts import ( # noqa: PLC0415
|
from reflector.db.transcripts import ( # noqa: PLC0415
|
||||||
TranscriptDuration,
|
|
||||||
TranscriptText,
|
TranscriptText,
|
||||||
transcripts_controller,
|
transcripts_controller,
|
||||||
)
|
)
|
||||||
@@ -1142,8 +1149,6 @@ async def finalize(input: PipelineInput, ctx: Context) -> FinalizeResult:
|
|||||||
if transcript is None:
|
if transcript is None:
|
||||||
raise ValueError(f"Transcript {input.transcript_id} not found in database")
|
raise ValueError(f"Transcript {input.transcript_id} not found in database")
|
||||||
|
|
||||||
merged_transcript = TranscriptType(words=all_words, translation=None)
|
|
||||||
|
|
||||||
await append_event_and_broadcast(
|
await append_event_and_broadcast(
|
||||||
input.transcript_id,
|
input.transcript_id,
|
||||||
transcript,
|
transcript,
|
||||||
@@ -1155,21 +1160,15 @@ async def finalize(input: PipelineInput, ctx: Context) -> FinalizeResult:
|
|||||||
logger=logger,
|
logger=logger,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Save duration and clear workflow_run_id (workflow completed successfully)
|
# Clear workflow_run_id (workflow completed successfully)
|
||||||
# Note: title/long_summary/short_summary already saved by their callbacks
|
# Note: title/long_summary/short_summary/duration already saved by their callbacks
|
||||||
await transcripts_controller.update(
|
await transcripts_controller.update(
|
||||||
transcript,
|
transcript,
|
||||||
{
|
{
|
||||||
"duration": duration,
|
|
||||||
"workflow_run_id": None, # Clear on success - no need to resume
|
"workflow_run_id": None, # Clear on success - no need to resume
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
duration_data = TranscriptDuration(duration=duration)
|
|
||||||
await append_event_and_broadcast(
|
|
||||||
input.transcript_id, transcript, "DURATION", duration_data, logger=logger
|
|
||||||
)
|
|
||||||
|
|
||||||
await set_status_and_broadcast(input.transcript_id, "ended", logger=logger)
|
await set_status_and_broadcast(input.transcript_id, "ended", logger=logger)
|
||||||
|
|
||||||
ctx.log(
|
ctx.log(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import os
|
|||||||
import httpx
|
import httpx
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from reflector.hatchet.constants import TIMEOUT_AUDIO
|
||||||
from reflector.logger import logger
|
from reflector.logger import logger
|
||||||
|
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ class AudioPaddingModalProcessor:
|
|||||||
headers["Authorization"] = f"Bearer {self.modal_api_key}"
|
headers["Authorization"] = f"Bearer {self.modal_api_key}"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient(timeout=TIMEOUT_AUDIO) as client:
|
||||||
response = await client.post(
|
response = await client.post(
|
||||||
url,
|
url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
|
|||||||
Reference in New Issue
Block a user