mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-18 17:17:54 +02:00
Jobs remove redundant fields (context tracking)
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace API.Schema.Jobs;
|
||||
|
||||
@ -9,12 +8,10 @@ public class DownloadMangaCoverJob(string mangaId, string? parentJobId = null, I
|
||||
[StringLength(64)]
|
||||
[Required]
|
||||
public string MangaId { get; init; } = mangaId;
|
||||
[JsonIgnore]
|
||||
public Manga? Manga { get; init; }
|
||||
|
||||
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
||||
{
|
||||
Manga? manga = Manga ?? context.Mangas.Find(this.MangaId);
|
||||
Manga? manga = context.Mangas.Find(this.MangaId);
|
||||
if (manga is null)
|
||||
{
|
||||
Log.Error($"Manga {this.MangaId} not found.");
|
||||
|
Reference in New Issue
Block a user