Fix QueuePopUp not showing any jobs

This commit is contained in:
glax 2024-10-20 02:40:17 +02:00
parent efdcba57ae
commit 73a1725eb9

View File

@ -19,10 +19,11 @@ export default function QueuePopUp({closeQueue} : {closeQueue(): void}){
return Job.GetJobs(jobs); return Job.GetJobs(jobs);
return []; return [];
}) })
.then(setStandbyJobs) .then((jobs) => {
.finally(() => {
console.debug("Removing Metadata Jobs"); console.debug("Removing Metadata Jobs");
setStandbyJobs(StandbyJobs.filter(job => job.jobType <= 1)); console.log(StandbyJobs)
setStandbyJobs(jobs.filter(job => job.jobType <= 1));
console.log(StandbyJobs)
}); });
Job.GetRunningJobs() Job.GetRunningJobs()
.then((jobs) => { .then((jobs) => {
@ -30,10 +31,9 @@ export default function QueuePopUp({closeQueue} : {closeQueue(): void}){
return Job.GetJobs(jobs); return Job.GetJobs(jobs);
return []; return [];
}) })
.then(setRunningJobs) .then((jobs) =>{
.finally(() =>{
console.debug("Removing Metadata Jobs"); console.debug("Removing Metadata Jobs");
setRunningJobs(RunningJobs.filter(job => job.jobType <= 1)); setRunningJobs(jobs.filter(job => job.jobType <= 1));
}); });
}, []); }, []);