Fix multiple jobs running on the same connector
Fix state-updates
Add more Documentation to JobController
Only allow non-running jobs to be started
This commit is contained in:
2025-03-03 21:13:03 +01:00
parent 8a0829ef69
commit e2ff2c76ed
3 changed files with 47 additions and 7 deletions

View File

@ -49,8 +49,10 @@ public abstract class Job
PgsqlContext context = scope.ServiceProvider.GetRequiredService<PgsqlContext>();
this.state = JobState.Running;
context.SaveChanges();
IEnumerable<Job> newJobs = RunInternal(context);
this.state = JobState.Completed;
context.SaveChanges();
return newJobs;
}