You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
836 B
32 lines
836 B
using Kean.Application.Query.Interfaces;
|
|
using Kean.Infrastructure.Hangfire;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Presentation.Rest.Jobs
|
|
{
|
|
/// <summary>
|
|
/// 发送TV统计数据处理作业
|
|
/// </summary>
|
|
public class TVStatisticsJob : IRecurringJob
|
|
{
|
|
private readonly IStatisticsService _statisticsService;
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public TVStatisticsJob(
|
|
IStatisticsService statisticsService)
|
|
{
|
|
_statisticsService = statisticsService;
|
|
}
|
|
|
|
/*
|
|
* 实现 Kean.Infrastructure.Hangfire.IRecurringJob.Execute 方法
|
|
*/
|
|
[DisallowConcurrentExecution]
|
|
public async Task Execute()
|
|
{
|
|
await _statisticsService.GetTvStatistics(null);
|
|
}
|
|
}
|
|
}
|