mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
29 lines
835 B
C#
29 lines
835 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Extensions.Logging;
|
|
using Wabbajack.BuildServer;
|
|
using Wabbajack.Server.DataLayer;
|
|
|
|
namespace Wabbajack.Server.Services
|
|
{
|
|
public class MirrorQueueService : AbstractService<MirrorQueueService, int>
|
|
{
|
|
private DiscordWebHook _discord;
|
|
private SqlService _sql;
|
|
|
|
public MirrorQueueService(ILogger<MirrorQueueService> logger, AppSettings settings, QuickSync quickSync,
|
|
DiscordWebHook discordWebHook, SqlService sqlService) :
|
|
base(logger, settings, quickSync, TimeSpan.FromMinutes(5))
|
|
{
|
|
_discord = discordWebHook;
|
|
_sql = sqlService;
|
|
}
|
|
|
|
public override async Task<int> Execute()
|
|
{
|
|
await _sql.QueueMirroredFiles();
|
|
return 1;
|
|
}
|
|
}
|
|
}
|