mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 17:34:17 +02:00
IPeriodic non-generic
This commit is contained in:
@ -2,7 +2,7 @@ using API.Schema.MangaContext;
|
|||||||
|
|
||||||
namespace API.Workers.MaintenanceWorkers;
|
namespace API.Workers.MaintenanceWorkers;
|
||||||
|
|
||||||
public class CleanupMangaCoversWorker(IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null) : BaseWorkerWithContext<MangaContext>(scope, dependsOn), IPeriodic<CleanupMangaCoversWorker>
|
public class CleanupMangaCoversWorker(IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null) : BaseWorkerWithContext<MangaContext>(scope, dependsOn), IPeriodic
|
||||||
{
|
{
|
||||||
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
||||||
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(60);
|
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(60);
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
namespace API.Workers;
|
namespace API.Workers;
|
||||||
|
|
||||||
public class UpdateChaptersDownloadedWorker(Manga manga, IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null)
|
public class UpdateChaptersDownloadedWorker(Manga manga, IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null)
|
||||||
: BaseWorkerWithContext<MangaContext>(scope, dependsOn), IPeriodic<UpdateChaptersDownloadedWorker>
|
: BaseWorkerWithContext<MangaContext>(scope, dependsOn), IPeriodic
|
||||||
{
|
{
|
||||||
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
||||||
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(60);
|
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(60);
|
||||||
|
@ -3,7 +3,7 @@ using API.Schema.NotificationsContext;
|
|||||||
namespace API.Workers;
|
namespace API.Workers;
|
||||||
|
|
||||||
public class SendNotificationsWorker(IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null)
|
public class SendNotificationsWorker(IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null)
|
||||||
: BaseWorkerWithContext<NotificationsContext>(scope, dependsOn), IPeriodic<SendNotificationsWorker>
|
: BaseWorkerWithContext<NotificationsContext>(scope, dependsOn), IPeriodic
|
||||||
{
|
{
|
||||||
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
public DateTime LastExecution { get; set; } = DateTime.UtcNow;
|
||||||
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(1);
|
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(1);
|
||||||
|
Reference in New Issue
Block a user