mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 17:34:17 +02:00
Refactor Controllers
SettingsController.cs SearchController.cs QueryController.cs NotificationConnectorController.cs MetadataFetcherController.cs MangaConnectorController.cs FileLibraryController LibraryConnectors WorkerController
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
namespace API.Workers;
|
||||
|
||||
public interface IPeriodic<T> where T : BaseWorker
|
||||
public interface IPeriodic
|
||||
{
|
||||
protected DateTime LastExecution { get; set; }
|
||||
protected TimeSpan Interval { 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