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:
@ -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();
|
||||
}
|
Reference in New Issue
Block a user