Remove OTT log highlighter

This commit is contained in:
Your Name
2025-09-29 21:26:21 -06:00
parent 8d6fc6fde0
commit 93cdf1f2f1
2 changed files with 4 additions and 37 deletions

View File

@@ -7,7 +7,7 @@
"contactEmail": "contact@ente.io",
"tagline": "Open Source End-to-End Encrypted Photos & Authentication",
"upstreamVersion": "1.0.0",
"version": "0.1.121",
"version": "0.1.122",
"healthCheckPath": "/ping",
"httpPort": 3080,
"memoryLimit": 1073741824,

View File

@@ -463,34 +463,6 @@ for webapp in photos accounts auth cast; do
fi
done
# ===============================================
# Museum log highlighter (extract OTTs from logs)
# ===============================================
prepare_ott_highlighter() {
cat > "/app/data/ente/server/ott-log-highlight.js" << 'EOF'
const readline = require('readline');
const rl = readline.createInterface({ input: process.stdin });
const shouldHighlight = (line) => {
if (!line) return false;
const lower = line.toLowerCase();
if (lower.includes('added ott')) return true;
if (lower.includes('ott"') || lower.includes(' ott ')) return true;
return false;
};
rl.on('line', (line) => {
process.stdout.write(line + '\n');
if (shouldHighlight(line)) {
const trimmed = line.trim();
process.stdout.write('============================================================\n');
process.stdout.write(`HIGHLIGHT: ${trimmed}\n`);
process.stdout.write('============================================================\n');
}
});
EOF
}
# ===============================================
# Node.js Placeholder Server
# ===============================================
@@ -632,9 +604,7 @@ const apiHandlers = {
}
const responsePayload = buildResponse(email);
log('============================================================');
log(`HIGHLIGHT: Verifying OTT ${ott} for ${email}`);
log('============================================================');
log(`Verifying OTT ${ott} for ${email}`);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(responsePayload));
@@ -721,9 +691,7 @@ const apiHandlers = {
}
const ott = ('' + Math.floor(100000 + Math.random() * 900000)).slice(-6);
log('============================================================');
log(`HIGHLIGHT: Generated OTT ${ott} for ${email}`);
log('============================================================');
log(`Generated OTT ${ott} for ${email}`);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ success: true, ott, email }));
@@ -895,10 +863,9 @@ if [ "$USE_PLACEHOLDER" = true ]; then
create_nodejs_placeholder
else
log "INFO" "Starting actual Museum server"
prepare_ott_highlighter
cd /app/data/ente/server
export ENVIRONMENT="${MUSEUM_ENVIRONMENT:-local}"
stdbuf -oL "$MUSEUM_BIN" 2>&1 | node ott-log-highlight.js | tee -a "$MUSEUM_LOG" &
stdbuf -oL "$MUSEUM_BIN" 2>&1 | tee -a "$MUSEUM_LOG" &
MUSEUM_PID=$!
log "INFO" "Started Museum server (pipeline PID: $MUSEUM_PID)"