1
0
mirror of https://github.com/C9Glax/tranga.git synced 2025-07-06 19:04:18 +02:00

Scoped PGSql Contexts for Threads

This commit is contained in:
2024-12-16 21:24:00 +01:00
parent c4fc2f436b
commit 03e89913e3
7 changed files with 47 additions and 8 deletions

@ -36,5 +36,13 @@ public abstract class Job
NextExecution = LastExecution.AddMilliseconds(RecurrenceMs);
}
public abstract IEnumerable<Job> Run();
public IEnumerable<Job> Run()
{
this.state = JobState.Running;
IEnumerable<Job>? newJobs = RunInternal();
this.state = JobState.Completed;
return newJobs;
}
protected abstract IEnumerable<Job> RunInternal();
}