35 lines
1.0 KiB
Markdown
35 lines
1.0 KiB
Markdown
# ClientFlow backend v4928.1.4.5 — outbox claim psycopg hotfix
|
|
|
|
Hotfix para o worker `clientflow-outbox-jasmin.service` falhar antes de reclamar itens pendentes da `integration_outbox` com:
|
|
|
|
```text
|
|
psycopg.errors.AmbiguousParameter: could not determine data type of parameter $1
|
|
LINE 6: AND ($1 IS NULL OR target_system = $1)
|
|
```
|
|
|
|
## Alteração
|
|
|
|
- `app/integration_outbox_service.py`
|
|
- `claim_pending_outbox()` deixa de usar a expressão SQL opcional `(:target_system IS NULL OR target_system = :target_system)`.
|
|
- A cláusula `AND target_system = :target_system` passa a ser adicionada apenas quando `target_system` existe.
|
|
|
|
## Validação local
|
|
|
|
```bash
|
|
python3 -m compileall -q app scripts
|
|
```
|
|
|
|
## Teste recomendado em produção
|
|
|
|
```bash
|
|
cd /mnt/ssd/home/plx/clientflow_backend
|
|
|
|
OUTBOX_TARGET_SYSTEM=jasmin \
|
|
JASMIN_OUTBOX_ENABLED=true \
|
|
OUTBOX_DRY_RUN=false \
|
|
.venv/bin/python scripts/process_outbox.py
|
|
|
|
sudo systemctl restart clientflow-outbox-jasmin.service
|
|
sudo systemctl status clientflow-outbox-jasmin.service --no-pager -l
|
|
```
|