Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives: publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style column wall with hostile-content-safe rendering, live control room with Auto Director, bridged chat governance with polls and quorum, distributed sandboxed transcode workers, encrypted content-addressed archive, monthly analytics. MIT licensed. See README.md and docs/.
This commit is contained in:
commit
aa5e262f3a
880 changed files with 111042 additions and 0 deletions
11
infra/peertube-workers/win/enroll-server.cjs
Normal file
11
infra/peertube-workers/win/enroll-server.cjs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
// Enrollment listener has concurrency zero and discards upstream logs.
|
||||
const fs = require('node:fs'), path = require('node:path'), {spawn} = require('node:child_process');
|
||||
const root=process.env.PT_ROOT || 'C:\\pt-worker';
|
||||
const cfg=JSON.parse(fs.readFileSync(path.join(root,'state','worker.json'),'utf8').replace(/^\uFEFF/,''));
|
||||
const env={...process.env, PT_ROOT:root, APPDATA:path.join(root,'profile','Roaming'), LOCALAPPDATA:path.join(root,'profile','Local'), FFMPEG_PATH:path.join(root,'bin','ffmpeg-nvenc.exe'),FFPROBE_PATH:path.join(root,'bin','ffprobe.exe'), PT_STATE_DIR:path.join(root,'state'),PT_WORKER_CONFIG:path.join(root,'state','worker.json')};
|
||||
const toml=fs.readFileSync(path.join(env.APPDATA,'peertube-runner-nodejs','Config','default','config.toml'),'utf8');
|
||||
if(!/^concurrency\s*=\s*0\s*$/m.test(toml)) throw Error('Enrollment requires concurrency zero');
|
||||
const child=spawn(cfg.node_binary,[path.join(root,'runner','node_modules','@peertube','peertube-runner','dist','peertube-runner.js'),'server','--enable-job','vod-web-video-transcoding','--enable-job','vod-hls-transcoding','--enable-job','vod-audio-merge-transcoding'],{env,detached:true,windowsHide:true,stdio:'ignore'});
|
||||
fs.writeFileSync(path.join(root,'state','enroll-process.json'),JSON.stringify({pid:child.pid}));
|
||||
child.unref(); console.log(JSON.stringify({enrollment_listener_started:true,concurrency:0}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue