public void Wakeup()
        {
            if ((DateContext.Now - _lastRunTime) < _wakeUpInterval)
            {
                return;
            }
            _lastRunTime = DateContext.Now;

            foreach (var date in _requestsReader.GetDatesInRequestTable())
            {
                if (UseRealTimeData(date))
                {
                    continue;
                }

                _preCalculatedTrendStrategy.PreCalculate(date);
            }
        }
Example #2
0
        public void Wakeup()
        {
            if ((DateContext.Now - _lastRun) < _runInterval)
            {
                return;
            }
            _lastRun = DateContext.Now;


            foreach (var date in _requestsReader.GetDatesInRequestTable())
            {
                if (UseRealtimeData(date))
                {
                    continue;
                }

                _preCalculatedDistributionStrategy.PreCalculateForDate(date);
            }
        }
        public void Wakeup()
        {
            if ((DateContext.Now - _lastWakeup) < _timeBetweenChecks)
            {
                return;
            }
            _lastWakeup = DateContext.Now;


            foreach (var date in _requestsReader.GetDatesInRequestTable().Where(d => !UseRealtimeData(d)))
            {
                if (!_preCalculatedReadStrategy.HasPreCalculatedData(date))
                {
                    _preCalculatedReadStrategy.PreCalculateData(date);
                }
                else
                {
                    //this means we have already aggregated data for this day, in theory this shouldn't happen (we account for clock skew with MaxTimeSkewWindow)
                    //todo: log this
                }
            }
        }