23 lines
655 B
C#
23 lines
655 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using StellaOps.Concelier.Core.Jobs;
|
|
|
|
namespace StellaOps.Concelier.Connector.Vndr.Msrc;
|
|
|
|
internal static class MsrcJobKinds
|
|
{
|
|
public const string Fetch = "source:vndr.msrc:fetch";
|
|
}
|
|
|
|
internal sealed class MsrcFetchJob : IJob
|
|
{
|
|
private readonly MsrcConnector _connector;
|
|
|
|
public MsrcFetchJob(MsrcConnector connector)
|
|
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
|
|
|
|
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
|
|
=> _connector.FetchAsync(context.Services, cancellationToken);
|
|
}
|