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/.
8 lines
485 B
JavaScript
8 lines
485 B
JavaScript
'use strict';
|
|
const fs=require('node:fs'),path=require('node:path');
|
|
const root=process.env.PT_ROOT || 'C:\\pt-worker', state=path.join(root,'state');
|
|
// The supervisor owns graceful shutdown; only stop after all processing jobs exit.
|
|
fs.writeFileSync(path.join(state,'supervisor-stop'), 'requested');
|
|
const timer=setInterval(()=>{
|
|
try {const r=JSON.parse(fs.readFileSync(path.join(state,'runner.json'),'utf8'));if(!r.running){clearInterval(timer);process.exit(0);}}catch{}
|
|
},1000);
|