mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-22 06:03:01 +02:00
test
This commit is contained in:
parent
3853e2daa2
commit
7f55aaf85d
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user