using System;
using NLog;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.ThingiProvider.Status;

namespace NzbDrone.Core.Applications
{
    public interface IApplicationStatusService : IProviderStatusServiceBase<ApplicationStatus>
    {
    }

    public class ApplicationStatusService : ProviderStatusServiceBase<IApplication, ApplicationStatus>, IApplicationStatusService
    {
        public ApplicationStatusService(IApplicationStatusRepository providerStatusRepository, IEventAggregator eventAggregator, IRuntimeInfo runtimeInfo, Logger logger)
            : base(providerStatusRepository, eventAggregator, runtimeInfo, logger)
        {
            MinimumTimeSinceInitialFailure = TimeSpan.FromMinutes(5);
            MaximumEscalationLevel = 5;
        }
    }
}
