Skip to content

Commit 3aba49f

Browse files
chore(dev): add stable worker and cache commands (#494)
1 parent 008842e commit 3aba49f

6 files changed

Lines changed: 15 additions & 3 deletions

File tree

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tasks:
1010

1111
worker:
1212
cmds:
13-
- uv run arq src.intric.worker.arq.WorkerSettings
13+
- uv run worker
1414
dir: ./backend
1515

1616
frontend:

backend/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ dependencies = [
6363

6464
[project.scripts]
6565
start = "intric.server.main:start"
66+
worker = "intric.worker.cli:start"
6667

6768
[dependency-groups]
6869
dev = [

backend/src/intric/worker/cli.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import sys
2+
3+
from arq.cli import cli
4+
5+
WORKER_SETTINGS = "src.intric.worker.arq.WorkerSettings"
6+
7+
8+
def start() -> None:
9+
cli(args=[WORKER_SETTINGS, *sys.argv[1:]], prog_name="worker")

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cd backend && uv run python init_db.py
4141
# Start development servers (3 terminals)
4242
cd backend && uv run start # Terminal 1
4343
cd frontend && bun run dev # Terminal 2
44-
cd backend && uv run arq src.intric.worker.arq.WorkerSettings # Terminal 3
44+
cd backend && uv run worker # Terminal 3
4545
```
4646

4747
### 2. Make Your First Contribution

docs/INSTALLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bun run dev
8080
**Terminal 3 - Worker (Optional, for document processing and for the crawler & apps to work):**
8181
```bash
8282
cd backend
83-
uv run arq src.intric.worker.arq.WorkerSettings
83+
uv run worker
8484
```
8585

8686
## Verify Installation

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"scripts": {
55
"build": "NODE_ENV=production FORCE_COLOR=1 bun run --filter @intric/ui build && NODE_ENV=production FORCE_COLOR=1 bun run --filter @intric/web build",
66
"dev": "NODE_ENV=development FORCE_COLOR=1 bun run --elide-lines=0 --filter @intric/web --filter @intric/ui dev",
7+
"dev:clean": "bun run clean:cache && bun run dev",
8+
"clean:cache": "rm -rf apps/web/node_modules/.vite apps/web/.svelte-kit packages/ui/.svelte-kit",
79
"lint": "FORCE_COLOR=1 bun run --filter '*' lint",
810
"check": "NODE_ENV=production FORCE_COLOR=1 bun run --filter '*' check",
911
"format": "FORCE_COLOR=1 bun run --filter '*' format",

0 commit comments

Comments
 (0)