This commit is contained in:
Glax 2025-05-18 14:41:43 +02:00
parent 3853e2daa2
commit 7f55aaf85d
2 changed files with 0 additions and 4 deletions

View File

@ -77,7 +77,6 @@ public abstract class Job
PgsqlContext context = scope.ServiceProvider.GetRequiredService<PgsqlContext>();
try
{
context.Attach(this);
this.state = JobState.Running;
context.SaveChanges();
ret = RunInternal(context).ToArray();

View File

@ -113,9 +113,6 @@ public static class Tranga
Log.Debug("Loading Jobs...");
DateTime loadStart = DateTime.UtcNow;
context.Jobs.Load();
Log.Debug("Updating Entries...");
foreach (EntityEntry entityEntry in context.ChangeTracker.Entries().ToArray())
entityEntry.Reload();
Log.Debug($"Jobs Loaded! (took {DateTime.UtcNow.Subtract(loadStart).TotalMilliseconds}ms)");
//Update finished Jobs to new states
List<Job> completedJobs = context.Jobs.Local.Where(j => j.state == JobState.Completed).ToList();