Job Inherits from GlobalBase
This commit is contained in:
parent
58db049496
commit
2572a537ab
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Tranga.Jobs;
|
namespace Tranga.Jobs;
|
||||||
|
|
||||||
public abstract class Job
|
public abstract class Job : GlobalBase
|
||||||
{
|
{
|
||||||
public MangaConnector mangaConnector { get; init; }
|
public MangaConnector mangaConnector { get; init; }
|
||||||
public ProgressToken progressToken { get; private set; }
|
public ProgressToken progressToken { get; private set; }
|
||||||
@ -11,7 +11,7 @@ public abstract class Job
|
|||||||
public DateTime? lastExecution { get; private set; }
|
public DateTime? lastExecution { get; private set; }
|
||||||
public DateTime nextExecution => NextExecution();
|
public DateTime nextExecution => NextExecution();
|
||||||
|
|
||||||
public Job(MangaConnector connector, bool recurring = false, TimeSpan? recurrenceTime = null)
|
public Job(GlobalBase clone, MangaConnector connector, bool recurring = false, TimeSpan? recurrenceTime = null) : base(clone)
|
||||||
{
|
{
|
||||||
this.mangaConnector = connector;
|
this.mangaConnector = connector;
|
||||||
this.progressToken = new ProgressToken(0);
|
this.progressToken = new ProgressToken(0);
|
||||||
@ -21,7 +21,7 @@ public abstract class Job
|
|||||||
this.recurrenceTime = recurrenceTime;
|
this.recurrenceTime = recurrenceTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Job(MangaConnector connector, ProgressToken progressToken, bool recurring = false, TimeSpan? recurrenceTime = null)
|
public Job(GlobalBase clone, MangaConnector connector, ProgressToken progressToken, bool recurring = false, TimeSpan? recurrenceTime = null) : base(clone)
|
||||||
{
|
{
|
||||||
this.mangaConnector = connector;
|
this.mangaConnector = connector;
|
||||||
this.progressToken = progressToken;
|
this.progressToken = progressToken;
|
||||||
@ -31,7 +31,7 @@ public abstract class Job
|
|||||||
this.recurrenceTime = recurrenceTime;
|
this.recurrenceTime = recurrenceTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Job(MangaConnector connector, int taskIncrements, bool recurring = false, TimeSpan? recurrenceTime = null)
|
public Job(GlobalBase clone, MangaConnector connector, int taskIncrements, bool recurring = false, TimeSpan? recurrenceTime = null) : base(clone)
|
||||||
{
|
{
|
||||||
this.mangaConnector = connector;
|
this.mangaConnector = connector;
|
||||||
this.progressToken = new ProgressToken(taskIncrements);
|
this.progressToken = new ProgressToken(taskIncrements);
|
||||||
|
Loading…
Reference in New Issue
Block a user