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>();
|
PgsqlContext context = scope.ServiceProvider.GetRequiredService<PgsqlContext>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.Attach(this);
|
|
||||||
this.state = JobState.Running;
|
this.state = JobState.Running;
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
ret = RunInternal(context).ToArray();
|
ret = RunInternal(context).ToArray();
|
||||||
|
@ -113,9 +113,6 @@ public static class Tranga
|
|||||||
Log.Debug("Loading Jobs...");
|
Log.Debug("Loading Jobs...");
|
||||||
DateTime loadStart = DateTime.UtcNow;
|
DateTime loadStart = DateTime.UtcNow;
|
||||||
context.Jobs.Load();
|
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)");
|
Log.Debug($"Jobs Loaded! (took {DateTime.UtcNow.Subtract(loadStart).TotalMilliseconds}ms)");
|
||||||
//Update finished Jobs to new states
|
//Update finished Jobs to new states
|
||||||
List<Job> completedJobs = context.Jobs.Local.Where(j => j.state == JobState.Completed).ToList();
|
List<Job> completedJobs = context.Jobs.Local.Where(j => j.state == JobState.Completed).ToList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user