Some more failsafes

This commit is contained in:
Samuele Lorefice
2025-09-04 20:40:22 +02:00
parent bd18d8f636
commit 3dacf84a85
2 changed files with 7 additions and 0 deletions

View File

@@ -33,6 +33,12 @@ public abstract class Job {
case EJobStatus.Failed:
Failed?.Invoke(this, JobStatus);
break;
case EJobStatus.Running: // If still running or waiting, mark as completed
case EJobStatus.Waiting: //somebody forgot to update the status and the method returned.
case EJobStatus.Completed:
Completed?.Invoke(this, JobStatus);
break;
case EJobStatus.Queued: // This should never happen
default:
Completed?.Invoke(this, JobStatus);
break;

View File

@@ -178,6 +178,7 @@ public class ThumbnailJob : Job {
return;
}
}
JobStatus.Complete("All thumbnails generated successfully.");
}
void IncrementProcessedAssets() {