mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-17 16:57:54 +02:00
Job Run pass context to add new Data
This commit is contained in:
@ -36,13 +36,13 @@ public abstract class Job
|
||||
NextExecution = LastExecution.AddMilliseconds(RecurrenceMs);
|
||||
}
|
||||
|
||||
public IEnumerable<Job> Run()
|
||||
public IEnumerable<Job> Run(PgsqlContext context)
|
||||
{
|
||||
this.state = JobState.Running;
|
||||
IEnumerable<Job> newJobs = RunInternal();
|
||||
IEnumerable<Job> newJobs = RunInternal(context);
|
||||
this.state = JobState.Completed;
|
||||
return newJobs;
|
||||
}
|
||||
|
||||
protected abstract IEnumerable<Job> RunInternal();
|
||||
protected abstract IEnumerable<Job> RunInternal(PgsqlContext context);
|
||||
}
|
Reference in New Issue
Block a user