openvibers/openvibe.host Commits

Inventory: Media's recording guard reads recordings_in_progress from its /api/ready.

OP OpenVibers committed 28 Sept 2026 · 19662b503e · 2 files, +5 −4

Media moves to PostgreSQL (ADR-035); after the switch its SQLite file is frozen, so a sqlite-count probe of
vods.is_recording would always answer 0 and let a deploy cut a live recording. The example inventory (and the
production one, edited at the switch) asks Media itself.

Changes

ddiff --git a/host.example.json b/host.example.json
iindex 5bc57dc..7bd534f 100644
---- a/host.example.json
++++ b/host.example.json
@@@ -328,9 +328,9 @@
"**/*.md"
],
"protected": {
-- "kind": "sqlite-count",
-- "db": "/opt/openvibe.media/data/media.db",
-- "sql": "SELECT count(*) AS n FROM vods WHERE is_recording = 1",
++ "kind": "http-json-count",
++ "url": "http://127.0.0.1:4100/api/ready",
++ "field": "recordings_in_progress",
"label": "recordings in progress"
},
"drain": {
ddiff --git a/test/cli-inventory.test.js b/test/cli-inventory.test.js
iindex 66c9eb1..257b1df 100644
---- a/test/cli-inventory.test.js
++++ b/test/cli-inventory.test.js
@@@ -21,7 +21,8 @@ runTests([
assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');
assert.ok(!inv.services.live.units.includes('openvibe-live.socket'));
assert.strictEqual(inv.services.live.protected.url, 'http://127.0.0.1:3000/api/streams');
-- assert.match(inv.services.media.protected.sql, /is_recording = 1/);
++ // Media on PostgreSQL (ADR-035): recordings in progress come from its /api/ready, not from a SQLite file.
++ assert.deepStrictEqual([inv.services.media.protected.kind, inv.services.media.protected.field], ['http-json-count', 'recordings_in_progress']);
// Every service on the host is deployed by a strategy (WS-N task 11): Games by pnpm-build.
assert.ok(Object.values(inv.services).every((s) => s.managed), 'every service is managed');
assert.deepStrictEqual(Object.fromEntries(['live', 'tools', 'sites', 'games', 'openre', 'network'].map((id) => [id, inv.services[id].strategy])), { live: 'release-layout', tools: 'multi-app', sites: 'static-build', games: 'pnpm-build', openre: 'release-layout', network: 'git-checkout' });