up
This commit is contained in:
		
							
								
								
									
										22
									
								
								src/StellaOps.Feedser.Source.Cccs/Jobs.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								src/StellaOps.Feedser.Source.Cccs/Jobs.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Threading;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using StellaOps.Feedser.Core.Jobs;
 | 
			
		||||
 | 
			
		||||
namespace StellaOps.Feedser.Source.Cccs;
 | 
			
		||||
 | 
			
		||||
internal static class CccsJobKinds
 | 
			
		||||
{
 | 
			
		||||
    public const string Fetch = "source:cccs:fetch";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
internal sealed class CccsFetchJob : IJob
 | 
			
		||||
{
 | 
			
		||||
    private readonly CccsConnector _connector;
 | 
			
		||||
 | 
			
		||||
    public CccsFetchJob(CccsConnector connector)
 | 
			
		||||
        => _connector = connector ?? throw new ArgumentNullException(nameof(connector));
 | 
			
		||||
 | 
			
		||||
    public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
 | 
			
		||||
        => _connector.FetchAsync(context.Services, cancellationToken);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user