fix: health check only checks hosters with jobs in queue
Previously checked all selected hosters, blocking uploads when an unrelated hoster (e.g. vidmoly) was down. Now only checks hosters that actually have jobs to start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
660d0b76a1
commit
92b4a35425
@ -1001,9 +1001,10 @@ async function startUpload() {
|
|||||||
const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued');
|
const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued');
|
||||||
if (jobsToStart.length === 0) return;
|
if (jobsToStart.length === 0) return;
|
||||||
|
|
||||||
// Auto health check
|
// Auto health check — only check hosters that have jobs to start
|
||||||
if (autoHealthCheckEnabled) {
|
if (autoHealthCheckEnabled) {
|
||||||
const checkHosters = hosters.filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx');
|
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) {
|
if (checkHosters.length > 0) {
|
||||||
healthCheckRunning = true;
|
healthCheckRunning = true;
|
||||||
try {
|
try {
|
||||||
@ -1059,9 +1060,10 @@ async function startSelectedUpload() {
|
|||||||
const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued'));
|
const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued'));
|
||||||
if (jobsToStart.length === 0) return;
|
if (jobsToStart.length === 0) return;
|
||||||
|
|
||||||
// Auto health check
|
// Auto health check — only check hosters that have jobs to start
|
||||||
if (autoHealthCheckEnabled) {
|
if (autoHealthCheckEnabled) {
|
||||||
const checkHosters = hosters.filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx');
|
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) {
|
if (checkHosters.length > 0) {
|
||||||
healthCheckRunning = true;
|
healthCheckRunning = true;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user