public async Task <bool> ReadIfPoisonWaitsForHourAsync(Hour hour)
        {
            ThrowOn.IsNull(hour, "hour cannot be null to check poison waits");

            var timeThreshold = hour.GetHourEnd();

            return(await this.processControlRepository.HasRunSuccessfully(ProcessControlId.CollectWaitStatistics, timeThreshold));
        }
 /// <inheritdoc />
 public async Task <IList <TGap> > ReadLargestGapsForEachDatabaseAsync <TGap>(Server server, Hour hour, GapActivityType activityType)
 {
     using (var conn = this.connectionFactory.GetEddsPerformanceConnection())
     {
         return((await conn.QueryAsync <TGap>(
                     Resources.DatabaseGap_ReadLargestGapsForHourAllDatabase,
                     new
         {
             server.ServerId,
             hourTimeStampStart = hour.HourTimeStamp,
             hourTimeStampEnd = hour.GetHourEnd(),
             activityType
         }).ConfigureAwait(false)).ToList());
     }
 }