mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 09:54:16 +02:00
Fix Worker-Cycle:
Periodic set last execution, Print Running Worker-Names when done
This commit is contained in:
@ -2,7 +2,7 @@ namespace API.Workers;
|
||||
|
||||
public interface IPeriodic
|
||||
{
|
||||
protected DateTime LastExecution { get; set; }
|
||||
internal DateTime LastExecution { get; set; }
|
||||
public TimeSpan Interval { get; set; }
|
||||
public DateTime NextExecution => LastExecution.Add(Interval);
|
||||
public bool IsDue => NextExecution <= DateTime.UtcNow;
|
||||
|
Reference in New Issue
Block a user