✨ feat: upload starts immediately, no blocking health check alert
Previously, the auto health check before upload would block with an alert dialog if any hoster check failed (e.g. "byse.sx: fetch failed"), preventing the upload from starting entirely. Now the upload starts immediately regardless of health check results. The startup account check still runs in the background on app launch. Failed hosters will naturally retry during the actual upload via the existing retry/fallback mechanism in upload-manager. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7fe4a92b66
commit
d7f9cd510f
@ -1292,9 +1292,6 @@ function getSelectedJobLinks() {
|
||||
// --- Upload ---
|
||||
async function startUpload() {
|
||||
if (uploading) return;
|
||||
// Wait for any running health check to finish (e.g. startup auto-check)
|
||||
// eslint-disable-next-line no-unmodified-loop-condition -- healthCheckRunning is modified externally between awaits
|
||||
for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s
|
||||
uploading = true; // set immediately to prevent double-click race
|
||||
updateQueueActionButtons();
|
||||
|
||||
@ -1305,30 +1302,6 @@ async function startUpload() {
|
||||
const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued');
|
||||
if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; }
|
||||
|
||||
// Auto health check — only check hosters that have jobs to start
|
||||
if (autoHealthCheckEnabled) {
|
||||
const jobHosters = new Set(jobsToStart.map(j => j.hoster));
|
||||
const checkHosters = [...jobHosters].filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx');
|
||||
if (checkHosters.length > 0) {
|
||||
healthCheckRunning = true;
|
||||
try {
|
||||
const rows = await executeHealthCheck(checkHosters, 'auto');
|
||||
const errors = rows.filter(r => r.status === 'error');
|
||||
if (errors.length > 0) {
|
||||
alert(`Auto-Check fehlgeschlagen:\n${errors.map(r => `${r.hoster}: ${r.message}`).join('\n')}\n\nUpload wurde nicht gestartet.`);
|
||||
uploading = false; updateQueueActionButtons();
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
alert(`Auto-Check fehlgeschlagen: ${err.message}\nUpload wurde nicht gestartet.`);
|
||||
uploading = false; updateQueueActionButtons();
|
||||
return;
|
||||
} finally {
|
||||
healthCheckRunning = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
queueJobs.forEach(j => {
|
||||
if (j.status === 'preview') j.status = 'queued';
|
||||
@ -1365,8 +1338,6 @@ async function startUpload() {
|
||||
|
||||
async function startSelectedUpload() {
|
||||
if (uploading) return;
|
||||
// eslint-disable-next-line no-unmodified-loop-condition -- healthCheckRunning is modified externally between awaits
|
||||
for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s
|
||||
uploading = true; // set immediately to prevent double-click race
|
||||
updateQueueActionButtons();
|
||||
|
||||
@ -1376,30 +1347,6 @@ async function startSelectedUpload() {
|
||||
const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued'));
|
||||
if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; }
|
||||
|
||||
// Auto health check — only check hosters that have jobs to start
|
||||
if (autoHealthCheckEnabled) {
|
||||
const jobHosters = new Set(jobsToStart.map(j => j.hoster));
|
||||
const checkHosters = [...jobHosters].filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx');
|
||||
if (checkHosters.length > 0) {
|
||||
healthCheckRunning = true;
|
||||
try {
|
||||
const rows = await executeHealthCheck(checkHosters, 'auto');
|
||||
const errors = rows.filter(r => r.status === 'error');
|
||||
if (errors.length > 0) {
|
||||
alert(`Auto-Check fehlgeschlagen:\n${errors.map(r => `${r.hoster}: ${r.message}`).join('\n')}\n\nUpload wurde nicht gestartet.`);
|
||||
uploading = false; updateQueueActionButtons();
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
alert(`Auto-Check fehlgeschlagen: ${err.message}\nUpload wurde nicht gestartet.`);
|
||||
uploading = false; updateQueueActionButtons();
|
||||
return;
|
||||
} finally {
|
||||
healthCheckRunning = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
jobsToStart.forEach(j => {
|
||||
if (j.status === 'preview') j.status = 'queued';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user