using Microsoft.Extensions.DependencyInjection;
using Tiobon.Core.Tasks;

namespace Tiobon.Core.Jobs;

/// <summary>
/// 任务处理中心
/// </summary>
public class TaskCenter
{
    private readonly ISchedulerCenter _schedulerCenter;

    static TaskCenter()
    {
        //ReloadOnChange = true 当appsettings.json被修改时重新加载

    }

    /// <summary>
    /// 初始化
    /// </summary>
    public TaskCenter(ISchedulerCenter schedulerCenter)
    {
        _schedulerCenter = schedulerCenter;
    }

    #region 启动任务服务
    /// <summary>
    /// 启动任务服务
    /// </summary>
    public void Start()
    {
        var container = new ServiceCollection();

        _schedulerCenter.InitJobAsync();
        
    }

    #endregion

}