mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-12 22:47:52 +02:00
Move adding jobs to context to Job.Run (from Tranga.cs)
This commit is contained in:
@ -58,8 +58,9 @@ public abstract class Job
|
||||
|
||||
this.state = JobState.Running;
|
||||
context.SaveChanges();
|
||||
IEnumerable<Job> newJobs = RunInternal(context);
|
||||
Job[] newJobs = RunInternal(context).ToArray();
|
||||
this.state = JobState.Completed;
|
||||
context.Jobs.AddRange(newJobs);
|
||||
context.SaveChanges();
|
||||
return newJobs;
|
||||
}
|
||||
|
Reference in New Issue
Block a user