openvibers/openvibe.host Commits
Inventory: Media's recording guard reads recordings_in_progress from its /api/ready.
Changes
@@@ -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": {@@@ -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' });
@@ -328,9 +328,9 @@
@@ -328,9 +328,9 @@
"**/*.md"
"**/*.md"
],
],
"protected": {
"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"
"label": "recordings in progress"
},
},
"drain": {
"drain": {
@@ -21,7 +21,8 @@ runTests([
@@ -21,7 +21,8 @@ runTests([
assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');
assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');
assert.ok(!inv.services.live.units.includes('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.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.
// 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.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' });
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' });