BaseWorker, BaseWorkerWithContext DoWork, call: Scope setting

TrangaBaseContext Sync return with success state and exception message
This commit is contained in:
2025-07-02 22:15:34 +02:00
parent 6cd836540a
commit e327e93163
19 changed files with 125 additions and 99 deletions

View File

@ -1,10 +1,8 @@
using API.APIEndpointRecords;
using API.Schema.MangaContext;
using API.Workers;
using Asp.Versioning;
using log4net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using static Microsoft.AspNetCore.Http.StatusCodes;
// ReSharper disable InconsistentNaming
@ -129,7 +127,7 @@ public class WorkerController(ILog Log) : Controller
if (worker.State >= WorkerExecutionState.Waiting)
return StatusCode(Status412PreconditionFailed, "Already running");
Tranga.StartWorker(worker);
Tranga.MarkWorkerForStart(worker);
return Ok();
}