mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-21 13:43:01 +02:00
ParentJob can be updated, DownloadAvailableJobs Endpoint automatically sets ParentJob to the DownloadAvailableChaptersJob (ondeleteCascade)
This commit is contained in:
parent
b3efcf19d9
commit
496b49ccb3
@ -137,6 +137,8 @@ public class JobController(PgsqlContext context, ILog Log) : Controller
|
||||
Job updateFilesDownloaded =
|
||||
new UpdateChaptersDownloadedJob(m, record.recurrenceTimeMs, dependsOnJobs: [retrieveChapters]);
|
||||
Job downloadChapters = new DownloadAvailableChaptersJob(m, record.recurrenceTimeMs, dependsOnJobs: [retrieveChapters, updateFilesDownloaded]);
|
||||
retrieveChapters.ParentJob = downloadChapters;
|
||||
updateFilesDownloaded.ParentJob = retrieveChapters;
|
||||
return AddJobs([retrieveChapters, downloadChapters, updateFilesDownloaded]);
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@ public abstract class Job
|
||||
[Required]
|
||||
public string JobId { get; init; }
|
||||
|
||||
[StringLength(64)] public string? ParentJobId { get; init; }
|
||||
[JsonIgnore] public Job? ParentJob { get; init; }
|
||||
[StringLength(64)] public string? ParentJobId { get; private set; }
|
||||
[JsonIgnore] public Job? ParentJob { get; internal set; }
|
||||
private ICollection<Job> _dependsOnJobs = null!;
|
||||
[JsonIgnore] public ICollection<Job> DependsOnJobs
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user