Fix ReferenceError: move publishStartTime to outer scope so silent failure detection can access it

This commit is contained in:
Laan Tungir
2026-06-30 11:36:36 -04:00
parent d04844cce8
commit b09bf0d839
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
{
"VERSION": "v0.7.83",
"VERSION_NUMBER": "0.7.83",
"BUILD_DATE": "2026-06-30T15:24:45.710Z"
"VERSION": "v0.7.84",
"VERSION_NUMBER": "0.7.84",
"BUILD_DATE": "2026-06-30T15:36:36.887Z"
}

View File

@@ -6215,6 +6215,9 @@ async function handlePublish(requestId, event, port) {
// Track current batch for progress display. Updated by the batch loop.
let currentBatch = 0;
let totalBatches = 0;
// Debug: track publish start time for timing analysis (defined in outer
// scope so the batch loop and silent-failure detection can access it).
const publishStartTime = Date.now();
if (isBroadcast && totalTarget > 0) {
console.log(`[Worker] Broadcasting to ${allBroadcastUrls.length} relays ` +
@@ -6233,9 +6236,6 @@ async function handlePublish(requestId, event, port) {
latestRelay: null,
});
// Debug: track publish start time for timing analysis
const publishStartTime = Date.now();
ndkEvent.on('relay:published', (relay) => {
const url = relay?.url || String(relay || '');
if (!url) return;