T-HUB/infra/peertube-workers/win/service-stop.cjs
glass beadian aa5e262f3a 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/.
2026-10-10 11:56:42 +00:00

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);