161 lines
11 KiB
Markdown
161 lines
11 KiB
Markdown
---
|
||
pageType: synthesis
|
||
id: synthesis.pg-boss-queue-ai-inference-worker
|
||
title: Pg-Boss Queue & AI Inference Worker
|
||
sourceIds:
|
||
- source.memory
|
||
- source.agents
|
||
- source.bridge.workspace-4c6d747f.memory-2d62c497
|
||
claims:
|
||
- text: "Очередь длинных задач (>60с): pg-boss v12.37.1 поверх внешней PostgreSQL
|
||
192.168.1.20:5432/openclaw_queue (схема pgboss, version=45); фиксация
|
||
параметров: expire=3600, retention=86400, retry=3, delay=60; skill
|
||
skills/pgboss_queue (node dist/index.js, receipts → queue-receipts/)."
|
||
status: verified
|
||
confidence: 0.9
|
||
evidence:
|
||
- kind: source-file
|
||
sourceId: source.memory
|
||
path: MEMORY.md
|
||
lines: "37"
|
||
note: канонический workspace-source MEMORY.md, буллет «Очередь длинных задач
|
||
(pg-boss v12.37.1, внешняя PG 192.168.1.20:5432/openclaw_queue)»,
|
||
строка 37
|
||
- text: "AI Inference Worker (Stage-2, 2026-10-10): очередь llm_inference +
|
||
резидентный worker `node dist/worker.js` → Ollama 192.168.1.200:11434,
|
||
модель qwen3.8-27b-q5xl:latest; single-flight (batchSize:1 +
|
||
localConcurrency:1) = VRAM-guard; evaluator Stage-2 8/8 PASS."
|
||
status: verified
|
||
confidence: 0.9
|
||
evidence:
|
||
- kind: source-file
|
||
sourceId: source.memory
|
||
path: MEMORY.md
|
||
lines: "37"
|
||
note: "буллет pg-boss: AI Inference Worker (Stage-2, 2026-10-10) — очередь
|
||
llm_inference, Ollama 192.168.1.200:11434, qwen3.8-27b-q5xl:latest,
|
||
single-flight; evaluator Stage-2 8/8"
|
||
- kind: source-file
|
||
sourceId: source.bridge.workspace-4c6d747f.memory-2d62c497
|
||
path: sources/bridge-workspace-4c6d747f-memory-2d62c497.md
|
||
lines: "67"
|
||
note: bridge-снимок MEMORY.md 2026-10-11T08:29:18Z (final state 2026-10-11,
|
||
Stages 3.1–3.2) — канонический sources/memory.md устарел
|
||
(2026-10-10T18:39:38Z)
|
||
- text: "MODERNIZATION Stage-3.1 (2026-10-11): воркер остановлен; DSN теперь
|
||
раздельный — worker → skills/pgboss_queue/.env.worker (mode 600), CLI →
|
||
~/.openclaw/.env (значения masked во всех выводах); секреты изолированы
|
||
(.env.worker 600, .gitignore создан в skills/pgboss_queue; workspace не
|
||
git-репозиторий — git check-ignore N/A, exit 128, зафиксировано);
|
||
check_task CLI добавлен в skills/pgboss_queue/index.ts (tsc exit 0);
|
||
evaluator Stage-3.1 8/8 PASS."
|
||
status: verified
|
||
confidence: 0.9
|
||
evidence:
|
||
- kind: source-file
|
||
sourceId: source.memory
|
||
path: MEMORY.md
|
||
lines: "37"
|
||
note: "буллет pg-boss: DSN раздельный (.env.worker 600, Stage-3.1; CLI →
|
||
~/.openclaw/.env), воркер остановлен (3.1), evaluator Stage-3.1 8/8
|
||
PASS"
|
||
- kind: source-file
|
||
sourceId: source.changelog
|
||
path: CHANGELOG.md
|
||
lines: "3"
|
||
note: "canonical workspace source: CHANGELOG.md, запись [INFRA] 2026-10-11 10:38
|
||
MSK MODERNIZATION-STAGE-3.1 Part A — SIGTERM stop, .env.worker 600,
|
||
.gitignore, git check-ignore N/A (exit 128)"
|
||
- text: "MODERNIZATION Stage-3.2 (2026-10-11): systemd-юнит
|
||
skills/pgboss_queue/openclaw-worker.service (md5
|
||
b9a967294e1bfa0e38fbd63d85a71679) — Type=simple, User=owner,
|
||
WorkingDirectory=/home/owner/.openclaw/workspace/skills/pgboss_queue,
|
||
ExecStart=/usr/bin/node dist/worker.js, EnvironmentFile=…/.env.worker,
|
||
Restart=always, RestartSec=10, UMask=0077, journal, After=docker.service
|
||
(нативного PG-юнита нет; PG = контейнер openclaw-postgres 0.0.0.0:5432);
|
||
systemd-analyze verify exit 0; evaluator Stage-3.2 5/5 PASS. Final state:
|
||
файл юнита только в workspace — деплой в /etc/systemd/system ждёт
|
||
sudo-окно оператора (cp + daemon-reload + enable --now)."
|
||
status: verified
|
||
confidence: 0.9
|
||
evidence:
|
||
- kind: source-file
|
||
sourceId: source.memory
|
||
path: MEMORY.md
|
||
lines: "37"
|
||
note: "буллет pg-boss: systemd unit openclaw-worker.service (md5
|
||
b9a967294e1bfa0e38fbd63d85a71679) в workspace — готов к деплою
|
||
оператором (sudo: cp + daemon-reload + enable --now);
|
||
After=docker.service, User=owner, Restart=always/RestartSec=10,
|
||
UMask=0077, journal"
|
||
- kind: source-file
|
||
sourceId: source.changelog
|
||
path: CHANGELOG.md
|
||
lines: "1"
|
||
note: "canonical workspace source: CHANGELOG.md, запись [INFRA] 2026-10-11 11:28
|
||
MSK MODERNIZATION-STAGE-3.2 — systemd unit (md5
|
||
b9a967294e1bfa0e38fbd63d85a71679), systemd-analyze verify exit 0,
|
||
evaluator 5/5 PASS, деплой ждёт sudo-окно"
|
||
- text: "MODERNIZATION Stage 4.1 (2026-10-11, подготовка только, live-таймеры не мигрированы — это Stage 4.2+): правила диспетчеризации фоновых задач — AGENTS.md §16.2 (R1: запрет прямого инференса локальных моделей из cron/heartbeat; R2: регулярные задачи skill-collection-review + wiki-ingest → очередь background_automation, priority 10 (pg-boss v12: fetch priority-desc, 10 = low); R3: payload — task_type (skill_review_task | wiki_ingest_task), target_agent, context_window_limit (integer >0, cap 64000), opt. requested_at/source; шаблоны skills/pgboss_queue/payloads/); имя очереди + типы + зафиксированы в skills/pgboss_queue (index.ts const BACKGROUND_AUTOMATION_QUEUE/KNOWN_TASK_TYPES + pre-connection payload-валидация + SKILL.md); очередь в PG НЕ создавалась (создаётся в Stage 4.2+ через boss.createQueue — send её не авто-создаёт); evaluator PASS 5/5 + re-audit пост-дедуп PASS 5/5."
|
||
status: verified
|
||
confidence: 0.9
|
||
evidence:
|
||
- kind: source-file
|
||
sourceId: source.memory
|
||
path: MEMORY.md
|
||
lines: "37"
|
||
note: "буллет pg-boss: «Stage 4.1 (2026-10-11, подготовка только, live-таймеры не мигрированы): правила §16.2; очередь/типы/шаблоны в skills/pgboss_queue»"
|
||
- kind: source-file
|
||
sourceId: source.agents
|
||
path: AGENTS.md
|
||
lines: "414-431"
|
||
note: "§16.2 Background Automation Rules (Stage 4.1): R1/R2/R3 дословно"
|
||
confidence: 0.9
|
||
status: active
|
||
updatedAt: 2026-10-11T08:50:29.027Z
|
||
---
|
||
|
||
# Pg-Boss Queue & AI Inference Worker
|
||
|
||
## Notes
|
||
<!-- openclaw:human:start -->
|
||
<!-- openclaw:human:end -->
|
||
|
||
## Summary
|
||
<!-- openclaw:wiki:generated:start -->
|
||
Очередь длинных задач (>60с) системы OpenClaw на pg-boss v12.37.1 поверх внешней PostgreSQL 192.168.1.20:5432/openclaw_queue (схема pgboss, version=45) + AI Inference Worker. Skill: skills/pgboss_queue (node dist/index.js; receipts → queue-receipts/). Фиксация параметров: expire=3600, retention=86400, retry=3, delay=60.
|
||
|
||
**AI Inference Worker (Stage-2, 2026-10-10).** Очередь llm_inference + резидентный worker `node dist/worker.js` → Ollama 192.168.1.200:11434, модель qwen3.8-27b-q5xl:latest; single-flight (batchSize:1 + localConcurrency:1) = VRAM-guard. Evaluator Stage-2: 8/8 PASS.
|
||
|
||
**Final state 2026-10-11 (MODERNIZATION Stages 3.1–3.2):**
|
||
- **DSN-разделение (Stage-3.1):** воркер → skills/pgboss_queue/.env.worker (mode 600), CLI → ~/.openclaw/.env — значения masked во всех выводах.
|
||
- **Изоляция секретов (Stage-3.1):** резидентный воркер остановлен (SIGTERM); .env.worker 600 + .gitignore в skills/pgboss_queue; workspace не git-репозиторий (git check-ignore N/A, exit 128 — зафиксировано); check_task CLI добавлен в skills/pgboss_queue/index.ts (tsc exit 0, self-check NOT_FOUND exit 0).
|
||
- **systemd-юнит (Stage-3.2):** skills/pgboss_queue/openclaw-worker.service (md5 b9a967294e1bfa0e38fbd63d85a71679): Type=simple, User=owner, WorkingDirectory=/home/owner/.openclaw/workspace/skills/pgboss_queue, ExecStart=/usr/bin/node dist/worker.js, EnvironmentFile=…/.env.worker, Restart=always, RestartSec=10, UMask=0077, StandardOutput/Error=journal, After=docker.service (нативного PostgreSQL-юнита нет; PG = контейнер openclaw-postgres 0.0.0.0:5432, healthy, владелец docker.service); systemd-analyze verify exit 0.
|
||
- **Деплой:** файл юнита только в workspace — деплой в /etc/systemd/system ждёт sudo-окно оператора (cp + daemon-reload + enable --now); /etc не тронут.
|
||
- **Верификация:** evaluator Stage-2 8/8, Stage-3.1 8/8, Stage-3.2 5/5 PASS (read-only, без мутаций).
|
||
- **Stage 4.1 (2026-10-11, подготовка только):** правила диспетчеризации — AGENTS.md §16.2 (R1–R3: запрет прямого инференса из cron; skill-collection-review + wiki-ingest → pg-boss `background_automation`, priority 10; payload-контракт); имя очереди/типы/payloads зафиксированы в skills/pgboss_queue (код + SKILL.md); очередь в PG не создана, live-миграция таймеров = Stage 4.2+; evaluator 5/5 + re-audit пост-дедуп 5/5 PASS.
|
||
|
||
## Related
|
||
- [[entities/Ollama]] — Ollama 192.168.1.200:11434 (цель inference worker)
|
||
- [[concepts/VRAM-Management]] — VRAM-guard: single-flight (batchSize:1 + localConcurrency:1)
|
||
- [[entities/Infrastructure]] — узлы и Docker-сервисы (контейнер openclaw-postgres)
|
||
- [[syntheses/infrastructure-overview]]
|
||
<!-- openclaw:wiki:generated:end -->
|
||
|
||
## Related
|
||
<!-- openclaw:wiki:related:start -->
|
||
### Sources
|
||
|
||
- [MEMORY](../sources/memory.md)
|
||
- [AGENTS](../sources/agents.md)
|
||
|
||
### Related Pages
|
||
|
||
- [Concept: Eurostela SEO Endpoint (MCP SEO Endpoint)](../concepts/Eurostela-SEO-Endpoint.md)
|
||
- [Concept: Git Backup & Recovery Protocol (AGENTS.md §20)](../concepts/Git-Backup-Recovery-Protocol.md)
|
||
- [Entity: Eurostela (евростела.ru)](../entities/eurostela.md)
|
||
- [Entity: Infrastructure](../entities/Infrastructure.md)
|
||
- [Hermes Evolution Pipeline (STM → Dreaming → Promotion)](hermes-evolution-pipeline-stm-dreaming-promotion.md)
|
||
- [Hermes Protocol / Agent Core (MEMORY.md)](hermes-protocol-agent-core-memory-md.md)
|
||
- [Multi-Project Routing Engine (Hermes)](multi-project-routing-engine-hermes.md)
|
||
<!-- openclaw:wiki:related:end -->
|