docs: show optional make params in README; tighten Makefile sync rule
- import-off: show limit/batch/min-scans params in make command examples - CLAUDE.md: clarify that parameter changes to make targets also require README update Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,7 +100,7 @@ update the README if the change affects any of the following:
|
||||
- **Stack or dependencies** — new or removed libraries
|
||||
- **Environment variables** — new, renamed, or removed variables
|
||||
- **API endpoints** — new routes, changed paths or methods, removed endpoints
|
||||
- **Makefile targets** — new or removed `make` commands
|
||||
- **Makefile targets** — new, removed, or changed `make` commands (including parameters)
|
||||
- **Project structure** — new top-level packages under `cmd/`, `internal/domain/`,
|
||||
`internal/adapters/`, or `internal/infra/`
|
||||
- **Database schema** — new tables added to the high-level table list
|
||||
|
||||
@@ -116,7 +116,7 @@ make run-worker-free # Воркер free-очереди
|
||||
| `make migrate-down` | Откатить последнюю миграцию |
|
||||
| `make migrate-status` | Статус миграций |
|
||||
| `make migrate-create name=<name>` | Создать новую миграцию |
|
||||
| `make import-off file=<path>` | Импортировать каталог из OpenFoodFacts JSONL/GZ |
|
||||
| `make import-off file=<path> [limit=N] [batch=N] [min-scans=N]` | Импортировать каталог из OpenFoodFacts JSONL/GZ |
|
||||
|
||||
## Импорт каталога продуктов
|
||||
|
||||
@@ -128,11 +128,13 @@ make run-worker-free # Воркер free-очереди
|
||||
|
||||
# Через make (DSN берётся из .env)
|
||||
make import-off file=openfoodfacts-products.jsonl.gz
|
||||
make import-off file=openfoodfacts-products.jsonl.gz limit=10000 min-scans=0
|
||||
|
||||
# Или напрямую с дополнительными флагами
|
||||
# Или напрямую
|
||||
go run ./cmd/importoff \
|
||||
-file=openfoodfacts-products.jsonl.gz \
|
||||
-dsn="$DATABASE_URL" \
|
||||
-limit=10000 \
|
||||
-min-scans=1
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user